POV-Ray : Newsgroups : povray.binaries.animations : Crazy ovals... Server Time
18 Jul 2024 16:22:50 EDT (-0400)
  Crazy ovals... (Message 1 to 4 of 4)  
From: Aubrey Lamb
Subject: Crazy ovals...
Date: 10 Mar 2004 05:10:26
Message: <404EE991.D8CFFA24@sympatico.ca>
Hello Folks
  I am in need of help in solving a three part problem. Hopefully some
patient soul out there will look upon this request as a challenge and
not the nightmare I do!
  First, how is an elliptical orbital path for an object created?
  Secondly, how can the speed of the orbit and the shape of the path be
graduated individually or interdependently over a set variable of time?
  And finally, could an elliptical orbital path be intersected at any
two points with a straight line and rotated on that axis?
  Thanx in advance to any that respond,
   TGL


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Crazy ovals...
Date: 10 Mar 2004 06:20:17
Message: <404ef9f1@news.povray.org>
>   Hello Folks

Hi there!

>   I am in need of help in solving a three part problem. Hopefully some
> patient soul out there will look upon this request as a challenge and
> not the nightmare I do!
>   First, how is an elliptical orbital path for an object created?
>   Secondly, how can the speed of the orbit and the shape of the path be
> graduated individually or interdependently over a set variable of time?
>   And finally, could an elliptical orbital path be intersected at any
> two points with a straight line and rotated on that axis?

Well, it depends on what you want to do and how you want to achieve it. If
you're merely wanting to translate an object along an elliptical path, well
then use the following:

#declare Elliptical_Position = vrotate(<1,0,0>,y*360*clock)*<1,1,.5>;

That'd give you a path on the y-plane, turning clockwise, and it'd be
"squished" on the z-axis, but main radius is 1 unit (from the <1,0,0> at the
beginning).

How would you change that gradually you ask? Either add something to the
initial <1,0,0>, e.g. enlargening it to <2,0,0> would double the size of the
ellipse. To further rotate the ellipse about some axis, just do this
#declare New_Position = vrotate(Elliptical_Position,z*360*clock);

This would move the object along an elliptical path, which itself rotates
about the z-axis. Different transformations can be applied as well, you just
need to understand what's going on and how to model it.

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Marvin Taylor
Subject: Re: Crazy ovals...
Date: 17 Mar 2004 13:34:30
Message: <40589a36@news.povray.org>
Aubrey Lamb wrote:
>>  I am in need of help in solving a three part problem. Hopefully some
>>patient soul out there will look upon this request as a challenge and
>>not the nightmare I do!
>>  First, how is an elliptical orbital path for an object created?
>>  Secondly, how can the speed of the orbit and the shape of the path be
>>graduated individually or interdependently over a set variable of time?
>>  And finally, could an elliptical orbital path be intersected at any
>>two points with a straight line and rotated on that axis?

Note that povray.binaries.animations is for posting binaries, not really 
for discussions, but I get the feeling that posting binaries there is a 
much greater offense.

Tim Nikias v2.0 wrote:
> 
> Well, it depends on what you want to do and how you want to achieve it. If
> you're merely wanting to translate an object along an elliptical path, well
> then use the following:
> 
> #declare Elliptical_Position = vrotate(<1,0,0>,y*360*clock)*<1,1,.5>;
> 
> That'd give you a path on the y-plane, turning clockwise, and it'd be
> "squished" on the z-axis, but main radius is 1 unit (from the <1,0,0> at the
> beginning).
> 
> How would you change that gradually you ask? Either add something to the
> initial <1,0,0>, e.g. enlargening it to <2,0,0> would double the size of the
> ellipse. To further rotate the ellipse about some axis, just do this
> #declare New_Position = vrotate(Elliptical_Position,z*360*clock);
> 
> This would move the object along an elliptical path, which itself rotates
> about the z-axis. Different transformations can be applied as well, you just
> need to understand what's going on and how to model it.
> 

There are two shortcomings with this simple approach when used in regard 
to orbits:

1) The ellipse or the central body (ie: the sun) needs to be shifted so 
that the body is at one of the focii.  If your major axis is on X, then 
use this in SDL with "a" the larger and "b" the smaller dimensions:

     #declare shift = sqrt(a*a-b*b)

In Tim's example, the "a" and "b" are the x and z coordinates of the 
scaling vector: <1,1,0.5>

Of course, if the mass of the two bodies do not differ by many orders of 
magnitude then you'll need to change this.  See:

    http://encyclopedia.thefreedictionary.com/barycenter

2) The speed of the satellite varies dramatically, especially with 
eccentric orbits.  See:
    http://encyclopedia.thefreedictionary.com/Orbital+speed
    http://www.physicsforums.com/archive/topic/11435-1.html

The former helps with the velocity, but to render you'd need the 
position instead.  Note that the "velocity" is a scalar (I was taught 
"speed" was a scalar, and "velocity" was a vector, but that's 
semantics).  In either event, we can't simply integrate the scalar to 
get a formula for position.
----
On the flip side, if you don't mind chewing up lots of CPU cycles in SDL 
loops, you can simulate this.  It seems good for viewing, but the errors 
get excessive if you want any true realism.

See my "Simulated orbits" post in povray.binaries.scene-files and also 
Baxbaum's post in povray.general "Re: But *how* to do the constant 
energy solution for particle physics?"


Post a reply to this message

From: Marvin Taylor
Subject: Re: Crazy ovals...
Date: 18 Mar 2004 13:41:03
Message: <4059ed3f@news.povray.org>
Marvin Taylor wrote:
> Aubrey Lamb wrote:
> 
>>>  I am in need of help in solving a three part problem. Hopefully some
>>> patient soul out there will look upon this request as a challenge and
>>> not the nightmare I do!
>>>  First, how is an elliptical orbital path for an object created?
>>>  Secondly, how can the speed of the orbit and the shape of the path be
>>> graduated individually or interdependently over a set variable of time?
>>>  And finally, could an elliptical orbital path be intersected at any
>>> two points with a straight line and rotated on that axis?

I will post a set of macros (and an example scene file) in 
p.b.scene-files for doing orbits -- *without* cumulative errors and 
since it finds the location directly it is much faster.   Note, that it 
iterates for precision, so the answer still isn't perfect, but the error 
is not *cumulative*.

See Tim's post for rotating the orbital path (although I didn't try it 
with these macros).

The scene file posted in p.b.s-f has a sun, earth and moon (with the 
dimensions completely off by lazy intent), whereas this has only a 
sun/earth.

Marvin

BTW, the post in p.g was by Dr. Engelbert Buxbaum, not Baxbaum - sorry.


Post a reply to this message


Attachments:
Download 'orbits.mpg' (112 KB)

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