Make an orbit
I am using WPF and mainly C# only as my assignment says, I am a beginner in WPF and I have drawn, the sun, and earth on the screen. However how can I make the earth move in a circular motion? I know this is very vague but some assistance on where I should start would be useful. Thanks!
8 Replies
how did you draw the earth? how is it positioned?
here is my code
https://codeshare.io/J7rYOE
I have a canvas with a height of 500, and width of 800
i placed the sun in the middle (i think) and earth 200 pixels away from the left
the part at the end with the dispatch timer is not relevant, i was just testing it out to see how it works
well, theres guaranteed to be a math equation that gives you an elliptical rotation around a given point
so use a timer, run that equation and move the planet
how would i move the planet? using Canvas.SetLeft() ?
$tias
probably yes
ok thanks