Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Animation in a Matlab plot

Subject: Animation in a Matlab plot

From: kawak

Date: 1 Feb, 2010 08:08:02

Message: 1 of 5

Hi guys,

I was on youtube, when I watched this amazing animation on a Matlab plot :

http://www.youtube.com/watch?v=Z_-du0dIHUE&NR=1

I know that he used the function plot3() in order to have a plot in three dimensions and the function camorbit() in order to move the camera around the orbit. However I've got not clue about the used function in order to plot the satellite (maybe sphere) and how did he display the motion of the satellite (if we know its velocity and its position around its orbit) ?

At present I've got only the plot of the central planet and the satellite's orbit.

Thank you for your help

Subject: Animation in a Matlab plot

From: us

Date: 1 Feb, 2010 11:50:23

Message: 2 of 5

"kawak " <kbenjamin@hotmail.fr> wrote in message <hk6252$pe2$1@fred.mathworks.com>...
> Hi guys,
>
> I was on youtube, when I watched this amazing animation on a Matlab plot :
>
> http://www.youtube.com/watch?v=Z_-du0dIHUE&NR=1
>
> I know that he used the function plot3() in order to have a plot in three dimensions and the function camorbit() in order to move the camera around the orbit. However I've got not clue about the used function in order to plot the satellite (maybe sphere) and how did he display the motion of the satellite (if we know its velocity and its position around its orbit) ?
>
> At present I've got only the plot of the central planet and the satellite's orbit.
>
> Thank you for your help

did you try to get in touch with the author of the (nice) demo(?)...

us

Subject: Animation in a Matlab plot

From: kawak

Date: 1 Feb, 2010 17:39:08

Message: 3 of 5

"us " <us@neurol.unizh.ch> wrote in message <hk6f5v$q1c$1@fred.mathworks.com>...
> "kawak " <kbenjamin@hotmail.fr> wrote in message <hk6252$pe2$1@fred.mathworks.com>...
> > Hi guys,
> >
> > I was on youtube, when I watched this amazing animation on a Matlab plot :
> >
> > http://www.youtube.com/watch?v=Z_-du0dIHUE&NR=1
> >
> > I know that he used the function plot3() in order to have a plot in three dimensions and the function camorbit() in order to move the camera around the orbit. However I've got not clue about the used function in order to plot the satellite (maybe sphere) and how did he display the motion of the satellite (if we know its velocity and its position around its orbit) ?
> >
> > At present I've got only the plot of the central planet and the satellite's orbit.
> >
> > Thank you for your help
>
> did you try to get in touch with the author of the (nice) demo(?)...
>
> us

Yes, I am waiting the answer.

But do you have an idea?

Subject: Animation in a Matlab plot

From: Tony Zhao

Date: 22 Jul, 2010 18:49:04

Message: 4 of 5

Hi,

One way in which you can show the orbit of the satellite is to obtain the equations of motion for the satellite (can be done just that only gravity is acting on the satellite) and then use ode45 to solve for the position and velocity at each time. You can then plot these x,y,z coordinates using plot3.

Also, another way to create a rotating Earth is to use the function hgtransform to rotate the Earth model about the Z axis. Using this method, you can create an Earth model that rotates in real time and have a closed loop orbit of a satellite as well.

Tony

"kawak " <kbenjamin@hotmail.fr> wrote in message <hk73js$gk8$1@fred.mathworks.com>...
> "us " <us@neurol.unizh.ch> wrote in message <hk6f5v$q1c$1@fred.mathworks.com>...
> > "kawak " <kbenjamin@hotmail.fr> wrote in message <hk6252$pe2$1@fred.mathworks.com>...
> > > Hi guys,
> > >
> > > I was on youtube, when I watched this amazing animation on a Matlab plot :
> > >
> > > http://www.youtube.com/watch?v=Z_-du0dIHUE&NR=1
> > >
> > > I know that he used the function plot3() in order to have a plot in three dimensions and the function camorbit() in order to move the camera around the orbit. However I've got not clue about the used function in order to plot the satellite (maybe sphere) and how did he display the motion of the satellite (if we know its velocity and its position around its orbit) ?
> > >
> > > At present I've got only the plot of the central planet and the satellite's orbit.
> > >
> > > Thank you for your help
> >
> > did you try to get in touch with the author of the (nice) demo(?)...
> >
> > us
>
> Yes, I am waiting the answer.
>
> But do you have an idea?

Subject: Animation in a Matlab plot

From: Nazar

Date: 22 Jul, 2010 19:50:08

Message: 5 of 5

I use this reference for any plot animation in MATLAB:

http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f10-1460.html

Hope this helps

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us