I am trying to make a model of the phases of the moon
can someone help me by telling me how i would make the moon rotate around the earth in a circle?
thanks SO much!
Offline
Quick question before I explain: Do you want the complicated math way or the simple way?
Offline
haha obviously the simple way
Offline
Well, the easiest way is to edit the costume of the moon sprite and set the Costume Center (little plus sign button) outside of the moon, some distance from it in fact. Then, just put the Turn blocks inside a Forever loop and you will get the result you are looking for.
Offline
I was busy with homework and Paddle2See answered it for me, that's the simple way.
Offline
The hard way uses trig, and im still trying to find the project i saw it used in. I think it was mayhem's but i think he deleted it.
Offline
markyparky56 wrote:
The hard way uses trig, and im still trying to find the project i saw it used in. I think it was mayhem's but i think he deleted it.
Basically you do this for the moon sprite:
<when green flag clicked>
<forever>
<go to x (( X position of the earth <+> (( sin of <direction> <*> how far away )) )) )y (( Y position of earth <+> (( cos of <direction> <*> how far away )) ))
And turn.
(I think)
Last edited by juststickman (2010-02-17 11:50:55)
Offline
juststickman wrote:
markyparky56 wrote:
The hard way uses trig, and im still trying to find the project i saw it used in. I think it was mayhem's but i think he deleted it.
Basically you do this for the moon sprite:
<when green flag clicked>
<forever>
<go to x (( X position of the earth <+> (( sin of <direction> <*> how far away )) )) )y (( Y position of earth <+> (( cos of <direction> <*> how far away )) ))
And turn.
(I think)
Thanks! it works!
Offline