All right.
So let's get started with our next lecture.
So here we will discuss some rotational motion, and we will begin really easy by considering just a
point mass.
And it's basically circling or orbiting around a specific point in space.
And we will make it most simple for us by choosing the zero point of the coordinate system as our point
around which to point mass will be circulating.
So the first thing, as always, that we will do is we will import Nampai because we will use Nampai
for many mathematical commands.
And also, we will import much plot lib and especially the pie plot module, because we will also create
a few plots.
So to begin our discussion, we have to think a bit about the units and the characterizing quantities
that describe our motion.
So our point mass will not really have a volume.
It's just a singular point in space, which makes the integration and everything much easier.
And still, it will have a well-defined mass.
And since this is here in numerical course and Python is working with NUMÉRIQUES, it's a bit difficult
to deal with units.
So we have to think in advance what we are going to do here.
And as often done in theoretical physics or in numerical physics, we will just define the mass as being
equal to one.
So we have here a particle with a mass of one kilogram, we could say.
Then we also have to think about the radius of our orbit, of our circular motion.
And likewise, I will just say the radius is equal to one.
Of course, we can later on change these values and see how the results change.
And also, we have to define the velocity.
So basically, the time it takes for the particle to really do one whole orbit, one complete circular
motion and instead of defining here at a time, I define the angular velocity and the angular velocity
I call omega.
And I also define it as being equal to one.
So before we continue to calculate the rotational or kinetic energy, I want to visualize the motion
that we are describing here.
And this you can see as an exercise in creating arrays or lists and also an exercise in plotting.
So what we're going to do first is we are going to create an array, a list of points of time.
So I call this tiara and we will then calculate the coordinates for these points of time and plot these.
So the tiara will be a continuous list of numbers, and we can create this with the non-power module
in space or the command line space.
And since the angle of velocity omega is equal to one, I simulate this from zero to two times PI because
this will be the time it takes for one whole hour circular orbit.
And then we have to define how many points do we have in this in this array between zero and two PI
and let's try 100 here.
And so when I run this, then we have to find the theory.
And now we're going ahead and we are calculate getting an X-ray and a white array.
And we are not really solving here the equation of motion numerically.
We already know that we want to describe a circular motion.
So I just go ahead and write down what is the X coordinate?
If you have some experience with polar coordinates, then you know that we can describe this really
easily with these polar coordinates.
So it's just the radius, which is, in our case, one times the cosine of the angle.
And this is also why we have to find the angular velocity, because now we can just write Omega Times
team.
And of course, instead of T, we have to write T array here so that this one will also be in the right.
So this will be basically the projection onto the x axis and the sine instead is the projected on the
y axis.
And I think we are good to go now so we can now go ahead and as well as incorrect, wanted here and
we can now go ahead and plot these two arrays in a scatterplot, for example, or in the regular plot.
So what I'm going to do first is I'm just going to plot this.
I'm going to write the polka dot plot and I'll write X three.
Come on, y.
All right.
And this works.
So you see, we have such an oval shape here.
We could also do scatterplot.
Then you would see individual points that we have created here, 100 of them.
But I think here I will use plots.
So of course, we could leave it as it is, but I want to make it just a bit nicer.
So this is also a practice for you to learn a bit more about plotting.
We can now right here, for example, for the ex-Labour or X coordinate and for the Y label, we can
write y coordinate.
And another thing that's a bit ugly here is that we have this typical aspect ratio of a plot, which
is typically not a square plot.
But since we want to plot here a circle, it would make much more sense to have a aspect ratio of one
where this length and this length would be the same.
And I found this to be a bit tricky in Python or in my plot loop because there is not a straightforward
command for setting the aspect ratio.
So what we have to do first, we have to create a real figure.
So we have to first define some additional stuff.
So we have to create a figure first by the command's plot figure and then I give it the name just fig.
That is how you typically do it.
You find many online examples that use exactly the same commands.
And then we define another thing, which is a subplot.
So basically, we take this figure, which is empty now and we are adding a subplot and.
The subplot is a really useful command, especially if you want to create a figure with several subplots.
So several individual figures are combined to a full figure.
So that is not what we are doing here.
We are just adding a single subplot.
But we could add more.
And now here the subplot has basically the syntax down to you to find how many plots are you going to
have in your total plots?
And we are going to have a grid here of plots that is just one times one.
We just want to have a single plot.
And now we have to index our plots, so it will be the first and only one.
So yeah, here is a bit useless because we just are going to have one plot.
So it will be one one one.
And then I give this subplot a name called X.
And now finally, I tend to find the aspect ratio of I see X set past back and then can give it here
value.
For example, I could write to that.
I would get something like this could also make it even more extreme.
But would we want to have?
Here is, of course, an aspect ratio of one.
So we have really the circle here now.
Another exercise that I want to show you is how can you really see what time does for this motion?
Because here basically we just have the trajectory of one full oscillation, so it's just a circle.
And of course, we could say, I only want to plot this to 1.5 Pi.
So then we would have this as our trajectory.
But still, it's a bit hard to see how this changes precisely under time.
So what we are going to do next is we are going to make a three dimensional plot.
And for this, we have practiced is already in the crash course.
First of all, we must enable D projection 3D object.
So our rights plotted on axes.
Projection is equal to 3D and then we can also give the plot a name.
So multi 3D will be the same as we used in the crash course, and now we can all at the data set that
we are going to plot here.
And for this, I will use a scatterplot plus 3D dot scatter 3D.
Yes, that's correct.
And then Ray Y array.
And for the z axis, I'm going to plot the time.
So T.
So we will discuss this in a moment.
But let me quickly add a few axes to this plot, so I will add an x axis label p o t three d dot set
underscore x label and then i write x coordinates that.
Of course, we do the same thing for Y and Z, so y, z, y and time.
So now you see the plots.
So the z axis is now visualizing the time.
In our case, this will be in seconds.
So maybe let me read this here, time from seconds and coordinate in meter.
So you see at zero seconds time to the corresponding coordinates.
This one here and then wants to time increases, it goes along to circle circular trajectory.
So you really have to know how to read this charge chart.
So it's not moving on a spiral.
It's moving on a circle.
The spiral just comes because we are plotting here to time on the z axis.
So with these two graphs here, I think it's pretty clear what's happening, and I hope that you like
this exercise and learning a bit more on how to plot such a motion.
So the next thing that we are going to do is we are going to calculate the energy, and this is pretty
easy because we are just using the equation that everyone knows.
So we are going to start with, I would say, the finding the period it's a period of one motion is
two PI.
Over Omega.
So this is how the this is actually how the Omega, how the angular velocity is defined.
Omega is actually two pi over the periods, and so the period is two pi over omega.
And then the path that you know, the path that that the particle has taken is basically the circumference
of the circle.
So of course, this is two pi times the radius, so two times PI, times the radius.
And now we can calculate the velocity.
So the velocity is, of course, you know, this path divided by the period as an F3 uniform motion.
You take the total path of total time and this is the velocity.
And in our case, this is the path divided by the period.
And you see, in both cases, we have the two PI.
So we have here two PI are divided by two pi, divided by omega.
So it is equal to velocity is equal to our times omega.
So, of course, we could run this now, but I just leave it here as a comment.
But we can also run.
It doesn't really matter.
And then the total energy the kinetic energy will be, yeah, will be the rotational energy.
It's exactly the same.
So the kinetic energy is, of course, the mass divided by two times the velocity squared.
So velocity is squared.
But in our case, I just want to take this and plug it in already.
So this will be just a commentaire.
And the actual solution that we are going to use in the following will be omega squared times radius
squared.
And you see, in our case, if omega is one and if the radius is run one and the mass is one, then
our rotational energy, which is the same as the kinetic energy, will be zero point five.
And since we have used as our unit so far, we know that this will be zero point five Joule.