Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
math rotation formula...
Author Message
Homer_simpson

Posted: Sun May 04, 2003 3:49 pm   Post subject: math rotation formula...

k... here's the problem I need a formula or procedure that would get OriginX,OriginY,SecondparX,SecondparY,Angle and then caclulate the SecondparX and SecondparY rotated By Angle

Homer_simpson

Posted: Sun May 04, 2003 3:51 pm   Post subject: (No subject)

i know
Y = R*Sin(deg)
X = R*Cos(deg)
and
But i cant get them to do what i want...

I have tried a procedure that would get
OriginX,OriginY,radius,Angle as well but i cant work it HEEEEEELP!!!!!!!!!!!!!!!!!!!!!!!!
Homer_simpson

Posted: Sun May 04, 2003 4:36 pm   Post subject: (No subject)

WHOOHOOO!!!!!!!!!!!!!!
I solved it took me an hour to work the formula...
But at last

 code: procedure rotate (OriginX, OriginY : int, var secondpartX, secondpartY : real, Rotaion : int)     var tempx := (((OriginX - secondpartX) * cosd (Rotaion)) + ((OriginY - secondpartY) * sind (Rotaion)))     var tempy := (((OriginY - secondpartY) * cosd (Rotaion)) - ((OriginX - secondpartX) * sind (Rotaion)))     secondpartY := OriginY - tempy     secondpartX := OriginX - tempx end rotate
Homer_simpson

Posted: Sun May 04, 2003 4:46 pm   Post subject: (No subject)

here's a pretty demo of how it works:
 code: procedure rotate (OriginX, OriginY : int, var secondpartX, secondpartY : real, Rotaion : real)     var tempx := (((OriginX - secondpartX) * cosd (Rotaion)) + ((OriginY - secondpartY) * sind (Rotaion)))     var tempy := (((OriginY - secondpartY) * cosd (Rotaion)) - ((OriginX - secondpartX) * sind (Rotaion)))     secondpartY := OriginY - tempy     secondpartX := OriginX - tempx end rotate var col := 1 var i := .0 var secondpartX, secondpartY := 500.0 secondpartY := 200 loop     rotate (320, 200, secondpartX, secondpartY, .01)     i += .01     drawline (320, 200, round (secondpartX), round (secondpartY), col)     if i >= 30 then         col += 1         i := 0     end if end loop
Asok

Posted: Sun May 04, 2003 5:22 pm   Post subject: (No subject)

how are you using glow in your text?
Homer_simpson

Posted: Sun May 04, 2003 5:25 pm   Post subject: (No subject)

is it not allowed? =/
Asok

Posted: Sun May 04, 2003 5:27 pm   Post subject: (No subject)

well no one has done it before so I'll assume we didn't make a decision on it. PM me with how you did that. (I'll need to exploit test glow system)
Tony

Posted: Sun May 04, 2003 5:42 pm   Post subject: (No subject)

its just a HTML tag... See
Tony's programming blog. DWITE - a programming contest.

Dan

Posted: Sun May 04, 2003 10:00 pm   Post subject: (No subject)

i am sprised no one eltes figered it out yet, lol

oh well as lonjg was you dont over do it
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Homer_simpson

Posted: Sun May 04, 2003 10:04 pm   Post subject: (No subject)

heh!
i was trying to work some dhtml on my text to make it really fancy but for some reason javascript doesn't work only straight html... =/
Dan

Posted: Sun May 04, 2003 10:25 pm   Post subject: (No subject)

Homer_simpson wrote:
heh!
i was trying to work some dhtml on my text to make it really fancy but for some reason javascript doesn't work only straight html... =/

that is so no one will wirte somting in javascript that will mess over the fourm or piss peopeop off. also not all html will wrok...
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Homer_simpson

Posted: Sun May 04, 2003 10:52 pm   Post subject: (No subject)

what ever you say dan =Ãž