POV-Ray : Newsgroups : povray.newusers : Please help a useless mathematician Server Time
6 Sep 2024 02:20:12 EDT (-0400)
  Please help a useless mathematician (Message 1 to 6 of 6)  
From: Andrew Cocker
Subject: Please help a useless mathematician
Date: 19 Jan 1999 16:06:08
Message: <36a4f3c0.0@news.povray.org>
Hi all,

This is probably such an elementary question, but how do I rotate an object in an
ellipse?

translate x*10
rotate y*clock*360

is all I've done before.

That's it. Any help gratefully received,

Andy Cocker


Post a reply to this message

From: Ron Parker
Subject: Re: Please help a useless mathematician
Date: 19 Jan 1999 16:14:22
Message: <36a4f5ae.0@news.povray.org>
On Tue, 19 Jan 1999 21:04:09 -0000, Andrew Cocker 
	<and### [at] acockerfreeservecouk> wrote:
>Hi all,
>
>This is probably such an elementary question, but how do I rotate an object in an
ellipse?
>
>translate x*10
>rotate y*clock*360
>
>is all I've done before.
>
>That's it. Any help gratefully received,


Aren't all mathematicians useless? :)

You're almost there.  All you need to do now is 

scale x*2

where 2 is the ratio of major axis to minor axis of your
ellipse.  If you're wanting to do a simulation of Kepler's
Laws, though, you'll need something better because this
locates the center of the ellipse at the origin, and you
probably want one of the foci at the origin.  Also, the
velocity will be neither constant nor physically correct.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Please help a useless mathematician
Date: 20 Jan 1999 07:21:26
Message: <36a5ca46.0@news.povray.org>
Ron Parker <par### [at] my-dejanewscom> wrote:
: scale x*2

  Wouldn't this scale the object too? I think that wasn't the intention.

  The correct answer is:

instead of

translate x*10
rotate y*clock*360

make:

translate <Radius1*sin(2*pi*clock),0,Radius2*cos(2*pi*clock)>

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: Andrew Cocker
Subject: Re: Please help a useless mathematician
Date: 20 Jan 1999 13:17:20
Message: <36a61db0.0@news.povray.org>
Thanks Nieminen,

That's just what I was looking for

Andy Cocker

Nieminen Mika wrote in message <36a5ca46.0@news.povray.org>...
>Ron Parker <par### [at] my-dejanewscom> wrote:
>: scale x*2
>
>  Wouldn't this scale the object too? I think that wasn't the intention.
>
>  The correct answer is:
>
>instead of
>
>translate x*10
>rotate y*clock*360
>
>make:
>
>translate <Radius1*sin(2*pi*clock),0,Radius2*cos(2*pi*clock)>
>
>--
>main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
>*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: Bob Hughes
Subject: Re: Please help a useless mathematician
Date: 21 Jan 1999 02:15:41
Message: <36A6D414.9DB0639D@aol.com>
This reminds of when I used to draw out planetary ellipses rather
crudely in 2 dimensions with GW Basic. I've forgotten everything about
it pretty much.
This:

translate <Radius1*sin(2*pi*clock),0,Radius2*cos(2*pi*clock)>

might also be used like:

translate
<OffsetX+(RadiusX*sin(2*pi*clock)),0,OffsetZ+(RadiusZ*cos(2*pi*clock))>

where the offsets are coordinates to center upon, and may also be used
as:

#declare OffsetRadiusX=3 //example
#declare OffsetRadiusZ=1.5 //example

#declare OffsetX=OffsetRadiusX*sin(2*pi*clock)
#declare OffsetZ=OffsetRadiusZ*sin(2*pi*clock)

Then the final translation vector.

translate <OffsetX*sin(2*pi*clock)),0,OffsetZ*cos(2*pi*clock))>

This should make the "orbit" revolve upon an orbiting center of mass, as
it were. Which is how the Earth and Moon do, in a slight way.

Perhaps finally a third (smaller offset) component of the translate
vector, Y, could perturb this also making for an inclined (and wavy if
the clock is times 2 for example) orbital plane.

Or am I way off base with this whole suggestion?
I'm guessing about it, so none of this may be useable. I'll have to get
into this stuff again someday.


Nieminen Mika wrote:
>
>   The correct answer is:
> 
> instead of
> 
> translate x*10
> rotate y*clock*360
> 
> make:
> 
> translate <Radius1*sin(2*pi*clock),0,Radius2*cos(2*pi*clock)>
> 
Warp. -*/

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
=Bob


Post a reply to this message

From: Andrew Cocker
Subject: Re: Please help a useless mathematician
Date: 21 Jan 1999 13:58:40
Message: <36a778e0.0@news.povray.org>
Hi Bob,

Bob Hughes wrote in message <36A6D414.9DB0639D@aol.com>...
>This reminds of when I used to draw out planetary ellipses rather
>crudely in 2 dimensions with GW Basic. I've forgotten everything about
>it pretty much.
>This:
>
>translate <Radius1*sin(2*pi*clock),0,Radius2*cos(2*pi*clock)>
>
>might also be used like:
>
>translate
><OffsetX+(RadiusX*sin(2*pi*clock)),0,OffsetZ+(RadiusZ*cos(2*pi*clock))>
>
>where the offsets are coordinates to center upon, and may also be used
>as:
>
>#declare OffsetRadiusX=3 //example
>#declare OffsetRadiusZ=1.5 //example
>
>#declare OffsetX=OffsetRadiusX*sin(2*pi*clock)
>#declare OffsetZ=OffsetRadiusZ*sin(2*pi*clock)
>
>Then the final translation vector.
>
>translate <OffsetX*sin(2*pi*clock)),0,OffsetZ*cos(2*pi*clock))>
>
>This should make the "orbit" revolve upon an orbiting center of mass, as
>it were. Which is how the Earth and Moon do, in a slight way.
>
>Perhaps finally a third (smaller offset) component of the translate
>vector, Y, could perturb this also making for an inclined (and wavy if
>the clock is times 2 for example) orbital plane.
>
>Or am I way off base with this whole suggestion?
>I'm guessing about it, so none of this may be useable.


No,no,no, this is great. I really ought to learn how to use sin/pi etc

Tata

Andy C


Post a reply to this message

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