Oblique shot
1990/11/01 Arrojeria, Eustakio - Elhuyar Zientziaren Komunikazioa | Lizaso, Pili - Informatika SailaElhuyar Fundazioa Iturria: Elhuyar aldizkaria
Following the line started at number 40, this time we addressed the simulation of the oblique shot.
As we know, the movement of the projectile launched with the angle a and the speed with respect to the horizontal is one of the examples of oblique shooting that we will work here.
Before starting with the explanation of the program, let us briefly recall the concept of oblique shooting and the formulas used.
In this type of movement the initial speed is broken down into two components:
horizontal speed: v ox = v or cos at vertical speed: v oy = v or without
The decomposition of the movement is as follows:
horizontal movement: straight and uniform s = s or + v ox t
Other languages
vertical movement: straight and uniformly accelerated
s = s or + v oy t + 1/2 t
Switzerland
a = -g (in this case)
After reading the previous lines it looks like a heavy program, but its use is light.
The projectile and target will appear on the screen. The projectile will always appear at the same starting point and the position of the target will change randomly. The user function is to objectify the projectile. To do this, you must select the angle and speed.
Description of the program
- 60-140: The projected projectile is represented in a given place. The distance at which the target will be located is calculated randomly and represented in the corresponding place.
- 150-330: First, the angle at which the projectile is to be launched should be selected. You can choose five angles: 0º, 30º, 45º, 60º and 90º. The selection will be made using the ?, i, d and RETURN keys. The values will change cyclically, that is, after 90º will appear 0º and before 0º 90º.
- 340-370: The selected angle is represented on the screen by an arrow.
- 380-550: Once the angle is selected, the desired speed of the projectile will be selected. It will be a value between 0 and 46 and will also be selected cyclically and using the ?, Anterior and RETURN keys.
- 560-670: From the selected values it is calculated the time it takes the projectile to return to the ground (570). With this time the cycle is completed. The projectile position is calculated per tenth of a second and is represented on the screen.
- 680: It checks whether the projectile has been objective or not.
Gai honi buruzko eduki gehiago
Elhuyarrek garatutako teknologia