Difference: ExerciseSheets (9 vs. 10)

Revision 102022-10-22 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="ASP2022"

Exercises

Line: 61 to 61
 You may copy/paste the result to a new editor window in thonny and save them to a file on the PC. Then you can plot the function using gnuplot.

gnuplot_sin.png

Added:
>
>

Calculating the throwing parabola

If the above is too simple for you, you may try to calculate the throwing parabola. Let's say, a stone is thrown at a speed of 30m/s and an angle of 30° with respect to ground. Calculate the trajectory of the stone until it hits the ground. You way define a function trajectory, taking initial speed, the angle and the time resolution for which you want to calculate the stone positions.

v_hor = v_initial * cos(angle)

v_ver = v_initial * sin(angle)

x(t) = v_hor * t

y(t) = v_ver * t - 1/2 * g * t**2

Like this, you can easily calculate the trajectories for different angles and different initial speeds.

trajectories.png

tp_10 is the trajectory for 10 degrees.

tp_45 is the trajectories for 45 degrees.

 

End of the second exercise session

Line: 138 to 157
 
META FILEATTACHMENT attachment="helloWorld.png" attr="" comment="" date="1665842121" name="helloWorld.png" path="helloWorld.png" size="73165" user="UliRaich" version="1"
META FILEATTACHMENT attachment="gnuplot_sin.png" attr="" comment="" date="1665866878" name="gnuplot_sin.png" path="gnuplot_sin.png" size="30601" user="UliRaich" version="1"
META FILEATTACHMENT attachment="exercises.odt" attr="" comment="" date="1666269925" name="exercises.odt" path="exercises.odt" size="147725" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="trajectories.png" attr="" comment="" date="1666445815" name="trajectories.png" path="trajectories.png" size="58903" user="UliRaich" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback