* draw_sphere (Function)
* animateOrbit (Function)
* saveGif (Function)
* Start (Script)
[surfHandle,surfX,surfY] = draw_sphere(A,X_Center,Y_Center)
draws a sphere with radius A and center coordinates(X_Center,Y_Center)
And returns the surf handle and X & Y data
draw_sphere(5,0,0);
animateOrbit(StarRadius,planetRadius,majorAxis,minorAxis)
Animate a Solar system with a star in the middle and a planet / planets.
animateOrbit(200,25,1000,750)
animateOrbit(300,[25 150 75],[1000,2000,3000],[750,1500,2250]);
animateOrbit(300,[25 150 75],[1300,2200,3500],[1000,2000,2500]);
allows you to save the animation in a GIF file. uncomment line 99 in animateOrbit function to Enable it
Starts The animation & holds 3 important control variables NumberOfCirculations speeds TimeSteps
determines the number of orbits the planets do before the animation stops
Controls the speed of each planet
Controls the the smoothness of transition over the circular orbit
uncomment any line of those to test the results
- multiple planet representation
- Speed Control for each planet
- Transition smoothness control
- eliptical path control via major and minor axes sizes
- save animation as a Gif If needed
- Body mass and density not included in motion equations
- GIF saving frame rate is fixed not flexible
I'd be Glad to answer your questions. I did this project a long time a go. But I didn't have the time to document and share it.