Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
183_notes:modeling_with_vpython [2022/11/14 15:42] – valen176 | 183_notes:modeling_with_vpython [2022/12/01 19:39] (current) – valen176 | ||
---|---|---|---|
Line 7: | Line 7: | ||
==== Lecture Video ==== | ==== Lecture Video ==== | ||
- | {{youtube> | + | {{youtube> |
Line 16: | Line 16: | ||
- **Objects** - Each program that you write is modeling the motion of some physical objects. So you will need to set up and place those objects in the scene. A big list of objects is [[http:// | - **Objects** - Each program that you write is modeling the motion of some physical objects. So you will need to set up and place those objects in the scene. A big list of objects is [[http:// | ||
- **Parameters & Initial Conditions** - Each program will have associated physical quantities for one or more of the objects in the scene. These might be the object' | - **Parameters & Initial Conditions** - Each program will have associated physical quantities for one or more of the objects in the scene. These might be the object' | ||
- | - **Time conditions** - The initial time and time step are needed in each program. The time step is particularly important because it controls how often the calculations occur. Typically, [[183_notes: | + | - **Time conditions** - The initial time and time step are needed in each program. The time step is particularly important because it controls how often the calculations occur. Typically, [[183_notes: |
- **Calculation loop** - Your job in mechanics is to predict or explain the motion of systems and the calculation loop is where that happens. In the loop is where the [[183_notes: | - **Calculation loop** - Your job in mechanics is to predict or explain the motion of systems and the calculation loop is where that happens. In the loop is where the [[183_notes: | ||
* [[183_notes: | * [[183_notes: | ||
* [[183_notes: | * [[183_notes: | ||
* [[183_notes: | * [[183_notes: | ||
+ | |||
+ | Note that in this example, the cart was moving at constant velocity, so we didn't need to do much step 4 above. In future weeks, there will be examples of how to use Glowscript to model motion when there is nonzero net force. | ||
<code python videoexample.py> | <code python videoexample.py> | ||
Line 44: | Line 46: | ||
t = t + dt | t = t + dt | ||
print(' | print(' | ||
- | | ||
</ | </ |