POV-Ray : Newsgroups : povray.general : I need a little math help Server Time
31 Oct 2024 08:16:35 EDT (-0400)
  I need a little math help (Message 1 to 8 of 8)  
From: Phil Clute
Subject: I need a little math help
Date: 23 Apr 2000 23:01:08
Message: <3903B99A.B95AB357@tiac.net>
I can't remember how to determine the new x y coordinates in a
circle and it's been a while since I've done any real math, so trying
to work the problem by myself has resulted in failure...

If I have a radius of 10(pov units)and the line is then rotated by
say 45degrees(or whatever angle I need), what is the new <x,y>?
I can't remember the formula for it...

I could just translate the object along x and then rotate around z,
but I kind of need the math to find it's new postion.

TIA
-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Chris Colefax
Subject: Re: I need a little math help
Date: 23 Apr 2000 23:34:09
Message: <3903c0b1@news.povray.org>
Phil Clute <pcl### [at] tiacnet> wrote:
> I can't remember how to determine the new x y coordinates in a
> circle and it's been a while since I've done any real math, so trying
> to work the problem by myself has resulted in failure...
>
> If I have a radius of 10(pov units)and the line is then rotated by
> say 45degrees(or whatever angle I need), what is the new <x,y>?
> I can't remember the formula for it...
>
> I could just translate the object along x and then rotate around z,
> but I kind of need the math to find it's new postion.

#declare NewPos = Radius*<cos(radians(Angle)), sin(radians(Angle))>;

Note that at Angle=0 you get <Radius, 0>, while at Angle=90 you get <0,
Radius> (i.e. the rotation is anti-clockwise around the z-axis, starting at
the positive x-axis).


Post a reply to this message

From: Pascal Baillehache
Subject: Re: I need a little math help
Date: 23 Apr 2000 23:38:51
Message: <3903c1cb@news.povray.org>
I'm not sure to have well understood what's your problem in what you say,
but the polar coordinates of a point in a plane are
x = radius*cos(angle)
y = radius*sin(angle)
where angle is the angle beetwin the x-axis and the line from the origin and
your point, and radius, the distance from the origin to the origin
hoping it'll help you in any way

Baillp


3903B99A.B95AB357@tiac.net...
> I can't remember how to determine the new x y coordinates in a
> circle and it's been a while since I've done any real math, so trying
> to work the problem by myself has resulted in failure...
>
> If I have a radius of 10(pov units)and the line is then rotated by
> say 45degrees(or whatever angle I need), what is the new <x,y>?
> I can't remember the formula for it...
>
> I could just translate the object along x and then rotate around z,
> but I kind of need the math to find it's new postion.
>
> TIA
> --
> Phil
> ...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Phil Clute
Subject: Re: I need a little math help
Date: 23 Apr 2000 23:50:19
Message: <3903C522.F0F7D599@tiac.net>
Thank you both.
-- 
Phil
...coffee?...yes please! extra sugar,extra cream...Thank you.


Post a reply to this message

From: Chris Huff
Subject: Re: I need a little math help
Date: 24 Apr 2000 12:26:30
Message: <chrishuff_99-1B5C48.11292724042000@news.povray.org>
In article <3903c0b1@news.povray.org>, "Chris Colefax" 
<chr### [at] tagpovrayorg> wrote:

> #declare NewPos = Radius*<cos(radians(Angle)), sin(radians(Angle))>;

I would have done it this way:
#declare NewPos = vrotate(x*Radius, y*Angle);

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: David Fontaine
Subject: Re: I need a little math help
Date: 24 Apr 2000 17:37:47
Message: <3904BE21.EAD45C53@faricy.net>
Phil Clute wrote:

> I can't remember how to determine the new x y coordinates in a
> circle and it's been a while since I've done any real math, so trying
> to work the problem by myself has resulted in failure...
>
> If I have a radius of 10(pov units)and the line is then rotated by
> say 45degrees(or whatever angle I need), what is the new <x,y>?
> I can't remember the formula for it...
>
> I could just translate the object along x and then rotate around z,
> but I kind of need the math to find it's new postion.

Well, in "real" math, 0 degrees is along the positive x-axis and rotation
goes counterclockwise. That uses the formula <u,v>=radius*<cos theta, sin
theta>
But since POV is a lefty system :-) you (if rotating around y) start at
positive z and go clockwise in which case it's <u,v>=radius*<sin theta,
cos theta>
and remember these functions take radians...

this is exactly the kind of stuff we're doing in math right now (well,
actually we've moved on to periodic functions in general) and it's so
booooring and such a waste of my time and so pointless and boring and I
learn nothing from it and it's all review and it's review even if you
don't know trig since we're just using scalars to transform graphs and
well i shouldn't complain at least i can get it done in class while he
blabs on and on because next year will be worse i'll get actual homework
in that class

--
___     _______________________________________________
 | \     |_          <dav### [at] faricynet> <ICQ 55354965>
 |_/avid |ontaine        http://www.faricy.net/~davidf/

"The only difference between me and a madman is that I'm not mad." -Dali


Post a reply to this message

From: Chris Huff
Subject: Re: I need a little math help
Date: 24 Apr 2000 17:57:57
Message: <chrishuff_99-2EFFB3.17005524042000@news.povray.org>
In article <3904BE21.EAD45C53@faricy.net>, David Fontaine 
<dav### [at] faricynet> wrote:

> this is exactly the kind of stuff we're doing in math right now (well,
> actually we've moved on to periodic functions in general) and it's so
> booooring and such a waste of my time and so pointless and boring and I
> learn nothing from it and it's all review and it's review even if you
> don't know trig since we're just using scalars to transform graphs and
> well i shouldn't complain at least i can get it done in class while he
> blabs on and on because next year will be worse i'll get actual homework
> in that class

You're lucky, I am stuck in Algebra II until next year, when I take 
Trigonometry and Analytical Geometry.(Finally, something interesting! I 
would rather have been doing Trig/Analytical Geometry *last* year...)
It looks like I won't even get Pre-Calculus until college. :-(

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: David Fontaine
Subject: Re: I need a little math help
Date: 24 Apr 2000 22:10:04
Message: <3904FDF4.49924BB6@faricy.net>
Chris Huff wrote:

> You're lucky, I am stuck in Algebra II until next year, when I take
> Trigonometry and Analytical Geometry.(Finally, something interesting! I
> would rather have been doing Trig/Analytical Geometry *last* year...)
> It looks like I won't even get Pre-Calculus until college. :-(

Damn! Sounds like a serious case of "disgruntled student feels cheated by
society and grows up to be the Unabomber." (No, no, j/k!!!!!)

--
___     _______________________________________________
 | \     |_          <dav### [at] faricynet> <ICQ 55354965>
 |_/avid |ontaine        http://www.faricy.net/~davidf/

"The only difference between me and a madman is that I'm not mad." -Dali


Post a reply to this message

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