
-----------------------------------
Homer_simpson
Sun May 04, 2003 3:49 pm

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 
please help... ASAP

-----------------------------------
Homer_simpson
Sun May 04, 2003 3:51 pm


-----------------------------------

i know
                      Y = R*Sin(deg)
                      X = R*Cos(deg)
and
                      radius^2  = X^2 + Y^2
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  :cry:  HEEEEEELP!!!!!!!!!!!!!!!!!!!!!!!!

-----------------------------------
Homer_simpson
Sun May 04, 2003 4:36 pm


-----------------------------------

WHOOHOOO!!!!!!!!!!!!!!
I solved it took me an hour to work the formula...  :roll: 
But at last

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
Sun May 04, 2003 4:46 pm


-----------------------------------
here's a pretty demo of how it works:
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
Sun May 04, 2003 5:22 pm


-----------------------------------
how are you using glow in your text?

-----------------------------------
Homer_simpson
Sun May 04, 2003 5:25 pm


-----------------------------------

is it not allowed? =/

-----------------------------------
Asok
Sun May 04, 2003 5:27 pm


-----------------------------------
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
Sun May 04, 2003 5:42 pm


-----------------------------------
its just a HTML tag... See

-----------------------------------
Dan
Sun May 04, 2003 10:00 pm


-----------------------------------
i am sprised no one eltes figered it out yet, lol

oh well as lonjg was you dont over do it   :wink:

-----------------------------------
Homer_simpson
Sun May 04, 2003 10:04 pm


-----------------------------------
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
Sun May 04, 2003 10:25 pm


-----------------------------------
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...

-----------------------------------
Homer_simpson
Sun May 04, 2003 10:52 pm


-----------------------------------
what ever you say dan =Ãž
Hail the admins... HAIL....  8)
