Code covered by the BSD License  

Highlights from
3D Visualization of SUN, EARTH and Moon

4.5 | 2 ratings Rate this file 36 Downloads (last 30 days) File Size: 1.17 MB File ID: #42658 Version: 1.0
image thumbnail

3D Visualization of SUN, EARTH and Moon



3D Visualization of SUN, EARTH and Moon

| Watch this File

File Information

Function SSEM displays 3D Visualization of SUN, EARTH and Moon with two option i.e. with actual data and without actual data just for fun.

SSEM('fun'); just for fun.
SSEM('actual'); For actual viewing.

Physics has been kept simple.

I've created this just for fun and to have a look about graphics capabilities of MATLAB. Any user can use and modify it and have fun.

At starting ain't able to rotate EARTH and MOON on its axis so if any one can do it I'll appreciate it.

Hope you'll enjoy it.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
17 Apr 2015 Mingjing

Happened to come across your submission; What you did was really cool. BTW, the reason why EARTH and MOON don't rotate is because in every iteration of the loop, their positions are calculated again from scratch(e.g. set(HEARTH,'xdata',xEarth(k) + Rm(2)*X...). This effectively resets the 'rotation angle' back to 0. Therefore, instead of specifying a fixed angle, you must use a number that grows as iteration progresses. For instance:

rotate(HEARTH,[0,0,1],2*k,[xEarth(k) yEarth(k) zEarth(k)]);

Also, I suggest you make 'fun' a default parameter, since this is the only working parameter for now.

25 Aug 2014 Ashish Meshram (Meet)

Thanks Dr. Jens Koopmann, for appreciation. I hope you enjoyed it.

Comment only
24 Aug 2014 Dr. Jens Koopmann


I like your program. Initially I had problem to get it to run. There is a command called im2double -> I replaced it with double and it worked fine

Thanks for sharing.

16 Jul 2013 Ashish Meshram (Meet)

Ain't sure why ain't able to rotate EARTH and MOON on its own axis as mentioned on line 182 and 193...
Please any one can help me on it...

Comment only
16 Jul 2013 Ashish Meshram (Meet)

Run the following command on your command window and enjoy the view by using your mouse when rotate option is enabeled


Comment only

Contact us