Physics simulations in EJS
Circular motion of a point mass
Try out the application that shows circular motion, where you can change the radius of the path R, the starting angular velocity ω, the angular acceleration α, the direction of rotation, show the linear velocity vector v, show the acceleration vectors – tangential aT, normal aN and total a – and show the quantities during the motion, on the following page:
- See a description of the simulation of the circular motion of a point mass on the following page: kosi-hitac.onrender.com/en/circular_motion
- To program a simulation of circular motion with the JavaScript library p5.js, visit the page: kosi-hitac.onrender.com/en/circular-motion
For the uniform circular motion of a point mass we can say:
- At every point of the path, the direction of the instantaneous velocity matches the tangent to the path.
- The velocity vector and the radius vector are perpendicular to each other.
Kinds of circular motion:
• uniform circular motion – the magnitude of the velocity does not change
• non-uniform circular motion – the magnitude of the velocity changes
Video lesson
Videos in Serbian with English subtitles – turn on subtitles (CC) in the YouTube player.
If a point mass moves along a circle at a speed of constant magnitude, the motion is called uniform circular motion. Since in uniform circular motion the numerical value (magnitude) of the velocity is constant, the tangential acceleration is zero.
However, the direction of the velocity changes all the time, so there is a normal acceleration.
The direction of the normal acceleration matches the radius of the circle, and it always points towards the centre of the circle, which is why it is also called radial or centripetal acceleration.
The magnitude of the centripetal acceleration is proportional to the square of the speed of the point mass, and inversely proportional to the radius of the path along which the point mass moves.
a = v²/r


Uniformly accelerated circular motion of a point mass
If a point mass moves along a circle with a speed whose magnitude changes uniformly, the motion is called uniformly accelerated (or decelerated) circular motion.
Since in uniformly accelerated circular motion the numerical value (magnitude) of the velocity also changes, there is both a normal (radial or centripetal) and a tangential acceleration.
The magnitude of the tangential acceleration is constant, while the magnitude of the normal acceleration is not constant (see the formula – it changes as the speed changes).

at = Δv / Δt
at = (v2 − v1) / (t2 − t1) = const
The total acceleration vector:
The magnitude of the total acceleration:
a = √(ac² + at²)
a = √((v²/r)² + at²)
In uniformly accelerated circular motion the direction of the tangential acceleration and the direction of the velocity are the same,
and the total acceleration vector and the velocity vector form an acute angle.
Angular velocity is the physical quantity that describes the speed of rotation of a point mass.
Angular acceleration is the physical quantity that describes the change of the angular velocity in non-uniform rotational motion.
Centripetal force
The direction of the normal acceleration matches the direction of the radius, and it points towards the centre of the circle.
Since there is an acceleration, there must also be a force that causes this acceleration.
This force has the same direction as the normal acceleration. Since it points towards the centre of rotation, it is called the centripetal force. The magnitude of the centripetal force:
Fc = m · v²/r
Fc = m · ω² · r
A string acts on a small ball with a centripetal force, forcing it to move along a circle. If the string breaks, the ball will fly off in a straight line along the tangent with the speed it had at that moment.

The tangential force changes the magnitude of the velocity of a body moving along a circular path, while the centripetal force changes the direction of the tangential velocity.
If there is also a tangential force, it will make the body move faster and faster (there is also a tangential acceleration).
The centripetal force is not a special kind of force; it is just the name for any force whose action makes a body move in a circle around some centre. The centripetal force is the force that makes a body move along a circular path.
Example T6.1
Create a simulation of a point mass moving along a circle with a constant angular velocity ω. Show the velocity vector and the normal acceleration vector.
Example T6.2
Create a simulation of a point mass moving along a circle with a constant angular acceleration α. Show the velocity and acceleration vectors.
Circular motion of a rigid body
See the simulation on the page: kosi-hitac.onrender.com/en/disk_rotation
A rigid body is a body that has a constant shape and volume and does not change its shape or volume while moving.
A rigid body can be thought of as made up of a large number of tiny parts marked by points.
Kinds of motion according to how the individual points of a rigid body move:
• translational
• rotational
Translational motion is the motion of a rigid body in which all its particles move in the same way and follow the same paths.
So we can say that:
• the paths of the points are parallel
• in the same time they travel the same distances
In translational motion, the motion of a rigid body of any shape and size can be treated as the motion of a point mass.
The quantities that describe this motion: displacement, distance travelled, velocity, acceleration.
In rotational motion the particles of a rigid body move along circular paths, and all those circles lie in planes that are parallel to each other.
The axis of rotation is perpendicular to these planes. It is the line that contains the centres of all the circles (it can go through the body, or it can be outside the body).

Physical quantities that describe rotational motion
Angular velocity is the physical quantity that describes the speed of rotation of a rigid body.
When a body rotates, its points do not have the same speeds, because points closer to the axis are slower, while points further from the axis are faster.
All the points of the body turn through the same angle in the same time, i.e. all the points of the body have the same angular velocity.
Angular displacement. In the same time all the particles turn through the same angle and make the same angular displacement.
Points 1 and 2 are at different distances from the axis of rotation. In the same time they travel different distances and have different displacements.
The radius vectors of points 1 and 2 turn through the same angle in the same time (picture).
The angle turned through is the physical quantity that describes rotational motion.
The angular displacement is defined from the angle turned through. Angular displacement is a vector quantity.
Angular acceleration is the physical quantity that describes the change of the angular velocity in non-uniform rotational motion.
When a body rotates, its points do not have the same speeds, because points closer to the axis are slower, while points further from the axis are faster. The direction of the angular acceleration vector depends on the change of the angular velocity.
If the angular velocity increases, the angular velocity and the angular acceleration have the same direction.
If the angular velocity decreases, the angular acceleration has the opposite direction to the angular velocity.

Disk rotation – uniform rotation task
Make a simulation of a disk of mass m and radius r rotating around a vertical axis with the angular velocity
ω = 1 rad/s

Plane motion of a rigid body

See the simulation on the following page: kosi-hitac.onrender.com/en/rigid_body_motion
Plane motion of a rigid body is motion in which, throughout the motion, all the points of the body move in planes parallel to a fixed plane chosen in advance.
The linear harmonic oscillator
See the mass and spring simulation on the following page: kosi-hitac.onrender.com/en/mass_and_spring
Periodic motion. Oscillatory motion
There are many kinds of motion that repeat in the same way after a certain time:
A wall clock, the motion of the planets, the oscillation of a spring, the swinging of the pendulum of a wall clock and so on.
PERIODIC MOTION is motion that repeats in the same or almost the same way after a certain time interval.
One form of periodic motion is OSCILLATORY MOTION
Oscillatory motion is periodic motion that repeats along one path. Examples of oscillatory motion, a simple pendulum and a weight hanging on a spring, are given in the picture
The quantities that describe this motion: oscillation, period, displacement (elongation), amplitude and frequency
Oscillation – quantities
An oscillation is one closed cycle of oscillatory motion, after which the motion repeats in exactly the same way.
Period (T) is the duration of one oscillation.
T=t/n
where t is the duration of n oscillations
Displacement (elongation) is the distance of the current position of the body from the equilibrium position, measured along the path in the direction away from the equilibrium position.
The amplitude (x0) is the largest displacement
The frequency (f) is equal to the number of oscillations per unit of time
f=n/t
T=1/f, the period is the reciprocal of the frequency
The unit of frequency is 1 Hz
1 Hz = 1/s (one hertz is equal to one oscillation per second)

Harmonic oscillatory motion
This is oscillatory motion that can be represented by a sine or cosine curve. The motion of an oscillator can be compared with the circular motion of a point mass that moves with a constant angular velocity. The points Mx and MT actually move in the same way – they oscillate according to the cosine law.
Mx – the projection of the point M onto the x axis
MT – the centre of the weight attached to the spring
φ=φ0 + ω*t
T=1/f, the period is the reciprocal of the frequency
φ – the angle of rotation of the point M
φ0 – the starting angle of rotation
ω – the angular velocity of rotation
The amplitude x0 is equal to the radius of the circular path. The formula for the displacement
From the picture we can write:
cos φ=x/R
R = x0
x = x0 · cos φ
x=x0*cos(φ0 + ω*t)
Angular velocity
From the formulas:
ω=φ/t ,
φ = 2·π·n
we can express the angular velocity
ω = 2*π*n/t=2*π/T
ω = 2 * π * f, which is also called the angular frequency

Velocity in harmonic oscillation
The linear velocity V
in circular motion has a constant magnitude.
The projection of the linear velocity onto the x axis, Vx=VT,
changes according to the sine law, just like the velocity of a body oscillating around its equilibrium position,
The link between the linear velocity V and the angular velocity ω
V = ω·R = ω·x0
from the picture:
sin φ = Vx/V,
so it follows that
Vx = V · sin φ
from which it follows:
Vx=- ω * x0*sin(φ0 + ω*t)
The minus sign shows the direction: while the angle φ grows from 0 to π, the point M (and the weight) moves in the negative direction of the x axis, so Vx is negative; in the second half of the oscillation Vx is positive.

An example of a weight on a spring oscillating on a horizontal surface with EJS
Example T6.3
Make a simulation of a linear harmonic oscillator: a weight with a spring oscillating in a horizontal plane.
The simulation is described in detail in the attached video.
Check your knowledge
Open the quiz
Quiz: Simulations in EJS
1. What is EJS (Easy Java Simulations)?
2. In uniform circular motion the angular velocity is:
3. What is the direction of the centripetal acceleration?
4. How is the linear speed related to the angular speed?


Image by