- #1
plaguebreath
- 9
- 0
I have to admit I am not good on physics but I am willing to try to understand how is possible for a plane or a glide that's falling without thrust applied downward to make a loop (by changing direction or using the elevators on the tail of plane, like in this picture.
I am try to write a program to simulate the motion of this object flying using this code (I consider only gravity for the moment not drag nor lift)
but offcurse with this code I only consider the sin and cos of the thrust applied to glider, what you can suggest me to do ? What other force applied to the airplane that will make him loop by changing the angle of elevators ? Best regards
I am try to write a program to simulate the motion of this object flying using this code (I consider only gravity for the moment not drag nor lift)
Code:
tempgy = g * frametime ; // acceleration of gy
tempay = ((thrust / m) * 32) * frametime * sin(degtorad(dir)) ; // acceleration of thrust y
tempax = ((thrust / m) * 32) * frametime * cos(degtorad(dir)) ; // acceleration of thrust x
y -= (vely + tempay/2 + tempgy/2) * frametime ; // update position y
x += (velx + tempax /2)* frametime ; // update position x
vely += tempgy + tempay; // update velocity y
velx += tempax; // update velocity x