POV-Ray : Newsgroups : povray.advanced-users : Physics of flying? Server Time
29 Jul 2024 18:18:43 EDT (-0400)
  Physics of flying? (Message 1 to 7 of 7)  
From: Tim Nikias
Subject: Physics of flying?
Date: 4 Dec 2001 06:17:55
Message: <3C0CB078.9CED3BD0@gmx.de>
I've already posted this under binaries.animations, but I'll ask here as
well.

My problem is as follows:
I have a particle with given speed and position. I want it to cross a
certain position. If I have to consider gravity, I need means of finding
if:
-the given speed is sufficient at all
-which would be the minimum speed required
-the direction the particle should head with the given/calculated speed

Hope this is not too much for someone to answer... ;)

Tim


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: Physics of flying?
Date: 4 Dec 2001 07:44:19
Message: <3C0CC531.76489401@atosorigin.com>
Tim Nikias wrote:
> 
> I've already posted this under binaries.animations, but I'll ask here as
> well.
> 
> My problem is as follows:
> I have a particle with given speed and position. I want it to cross a
> certain position. If I have to consider gravity, I need means of finding
> if:
> -the given speed is sufficient at all

The force for flying is proportional to :
  - the profil exposed to the air speed (assume some constante, unless
    your object is rolling showing a different aspect...)
  - some exponential of the air speed (relative speed)
    For low velocity (a.k.a the usual one), you may approximate it with
    a simple square of the speed

Speed is sufficient when the force in the +y direction counter-balance the
 gravity.

    m.g/2  == a.v.v

    v = V-wind

> -which would be the minimum speed required

  Best is to compute that from what you expect.
  If you want to simulate a plane which can take off at 100 space unit/time unit
   (100 km/h, or 100 Miles/h or whatever), once you have fixed the mass of the
  object (as well as the gravity value), you automatically get the value 'a' in
the 
  equation. Then you fix it once and for all.

> -the direction the particle should head with the given/calculated speed

  ???? I do not understand.
  I assume particule are just perfect sphere, so heading do not have sens.
  If you mean the orientation of the trust for the engine, 
  it depend on the ratio you want or need to have between the horizontal
  acceleration (which is up to you) and the vertical acceleration
  (which is constrained by the previous formula, if you really want to
  supply some of the lifting power directly by the trust of the engine
  rather that by the suffisant velocity of the media around the object). 
  Keep in mind that the horizontal velocity is the integration of
  the horizontal acceleration minus the air resistance.
     ( i.e. :     dv = h_a - b.v.v )
  b should be also a constant (depend on the profil too).
  h_a is the horizontal acceleration
  v is the relative air speed

Typical WWI airplane heading match the horizontal velocity.
Some modern english airplane do not fly to take off, they are
lifted by the engine like rocket.

> 
> Hope this is not too much for someone to answer... ;)

Hope you can understand me... I do not know where you are going.


Post a reply to this message

From: Tim Nikias
Subject: Re: Physics of flying?
Date: 4 Dec 2001 07:54:52
Message: <3C0CC72D.92FCC73F@gmx.de>
Well, I don't understand, but I also think that you've misunderstood my
(or, which would be more precise, I didn't ask too well ;) ) problem.

This is the environment:
-Gravity, which pulls downward
-no wind
-no air friction

This is the particle:
-Speed
-Position
-Target

Everything takes place in 3D, but, since the path could be aligned to some plane
or another, we can stay put with 2D.
I can calculate the relation between position and target as range, as absolut
distance,
and as height.

Question is: Which angle does the particle's thrust (speed) has to be in
relation to the ground plane, in order to hit the target?


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: Physics of flying?
Date: 4 Dec 2001 10:31:20
Message: <3C0CEC51.793E496@atosorigin.com>
Tim Nikias wrote:
> 
> Well, I don't understand, but I also think that you've misunderstood my
> (or, which would be more precise, I didn't ask too well ;) ) problem.
> 
> This is the environment:
> -Gravity, which pulls downward
> -no wind
> -no air friction
> 
> This is the particle:
> -Speed
> -Position
> -Target
> 

So, When you say 'flying', it is just 'ballistic' ? (initial speed then
get more gravity, nothing else) 
Or is it rather 'propulsion' (there is some continuous thrust as well as
gravity).


> Everything takes place in 3D, but, since the path could be aligned to some plane
> or another, we can stay put with 2D.


> I can calculate the relation between position and target as range, as absolut
> distance,
> and as height.

Ok, in 2d, ballistic, easier, first:

   y = a.t.t + b.t + c
   x = d.t

 (t = clock !)

you will have to resolve the system for the initial speed vector
 ( dx & dy at t=0 ), using the target and initial position.
 There is an infinity of solution without the speed, because 
 the curve is a parabol and you have only two poind.
 speed fix the tangent and the length of speed should be
 adjusted according to the gravity intensity.

Beware: the model assument a plane world, not a spherical planet.
 (experiment during WWI & WWII show that earth spherical nature has
 an impact on canonball destination).

Propultion:
 Question: can the direction of the thrust change during the 'fly' ?
   (including can the thrust be turn on/off instantly)
 if yes and the thrust is stronger than the gravity, any curve are possible.
 if yes and the thrust is not stronger, it can be very complex, unless
  you simply use the thrust to either:
     - first gain horizontal velocity, then only to counter-act gravity
          (go back to the ballistic model, with a reduced gravity for the
           second step. For the first step, same ballistic model, but
           x = d.t + e*t*t/2 )
     - only try to counter-act part of the gravity
     - only gain constant horizontal acceleration
           (ballistic model, with x = d.t + e*t*t/2 )
 if no: the vertical component of the trust just modify the local gravity effect
         (reduce g), while the horizontal part keeps adding acceleration
             (see above)

> 
> Question is: Which angle does the particle's thrust (speed) has to be in
> relation to the ground plane, in order to hit the target?

For the ballistic model:
  for a given gravity and target, if the angle is free, there is potentially
 an infinite number of answer (when there is an answer), unless the amount of
 speed is somehow limited.


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: Physics of flying?
Date: 4 Dec 2001 10:35:16
Message: <3C0CED41.EB59631@atosorigin.com>


> Ok, in 2d, ballistic, easier, first:
> 
>    y = a.t.t + b.t + c
>    x = d.t
> 
>  (t = clock !)
> 
> you will have to resolve the system for the initial speed vector
>  ( dx & dy at t=0 ), using the target and initial position.
>  There is an infinity of solution without the speed, because
>  the curve is a parabol and you have only two poind.
>  speed fix the tangent and the length of speed should be
>  adjusted according to the gravity intensity.

Ooops, I forget to push gravity in the system:
Obviously: a = -g/2


Post a reply to this message

From: Tim Nikias
Subject: Re: Physics of flying?
Date: 4 Dec 2001 20:48:56
Message: <3C0D7C9B.48EF0AA3@gmx.de>
I've found a solution by first calculating the path the particle would
take if it would look at the target, start with desired speed, but drops

in altitude due to gravity. I look how much it passes the target in
height,
and add some more to the initial target. Recalculate.
This way, we move closer and closer to the actual target without having
to do trigonometric identities and/or series expansions (which I am not
capable of)
in order to find the exact angle. I get a near approach that is
sufficient for the
system I'm using it with.

Nontheless, thank for your help.

Tim


Post a reply to this message

From: Trevor Quayle
Subject: Re: Physics of flying?
Date: 5 Dec 2001 13:04:19
Message: <3c0e61a3$1@news.povray.org>
I finished a macro to do this and find out you don't need it anymore!
Oh well, here it is anyways. I have debugged it as best I can, if you try it
and have a problem, let me know.

Use it in a scene as follows:

#declare Angle= BA(V,D,H,g,P,Sno);

or equivilant, as the macro returns a number, not a declared variable.

Syntax:
V=total velocity (should be positive)
D=Horizontal distance (should be positive)
H=change in height (initial to final, can be any number)
g=gravitational acceleration (i.e., -9.81  (should be negative, but not
necessarily)
P=precision (decimal places, i.e. P=3 : 3 decimal places)
Sno=solution number (should be 1 or 2)*

*for every given set of variables there is up to four solutions possible,
the macro assumes the projectile wants to land on the spot coming down so
two possible solutions can be eliminated.
There remains up to (not necessarily always) 2 angles to reach the given
distance, using Sno=1 returns the first, Sno=2 returns the second.
The macro may return errors to let you know if, 1) the final height cannot
be reached, 2) the final distance cannot be reached or 3) the second
solution is selected and there is no second solution.
Macro returns angle in degrees

examples:

#declare A = BA(10,10,-10,-9.81,4,1);
returns 67.8849 degrees

#declare A = BA(10,10,-10,-9.81,4,2);
returns error (no second solution)

Now the macro:

//start
#macro BA(V,D,H,g,P,Sno)
  #if (-1/2*V^2/g<H) #error "Final height(H) unattainable at given
velocity(V)!" #end
  #local chk=0;
  #local dD1 = 1;
  #local dA =10;
  #local A=0;
  #local Sol=1;
  #while (dD1 != 0)
    #local Vy=V*sin(radians(A));
    #local Vx=V*cos(radians(A));
    #if (Vy^2+2*g*H>=0)
      #local dX=-Vx*(Vy+sqrt(Vy^2+2*g*H))/g;
      #local dD1=int((D-dX)*10^(P+1));
      #if (chk=0) #local dD2=dD1; #end
      #if (dD1 = dD2)
        #local chk=chk+1;
        #if (chk=3)
          #if (Sol=2)
            #error "No second solution!"
          #else
            #error "Final distance unattainable at given velocity!"
          #end
        #end
      #else
        #local chk=1;
      #end
      #if (dD1 != 0)
        #if (dD1*dD2<0)
          #if (Sno!=Sol)
            #local Sol=Sol+1;
          #else
            #local dA=-dA/2;
          #end
        #else
          #if (dD1>0 & dD1-dD2>0)
            #if (Sol=2)
              #error "No second solution!"
            #else
              #local A=A-dA*2;
              #local dA=dA/2;
            #end
          #end
        #end
      #end
      #local dD2=dD1;
    #end
    #if (dD1 != 0) #local A=A+dA; #end
  #end
  #debug concat("Angle = ",str(A,0,5)," degrees\n")
  A
#end
//end


-tgq


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.