physics

Import it with @use:physics, then call its constructs under that name.

Pack
A block on a 30° blue slope, with its red weight W resolved into a dashed orange W sin θ down the slope and a dashed teal W cos θ into it, and a purple normal reaction R pushing out from the slope.A block on a 30° blue slope, with its red weight W resolved into a dashed orange W sin θ down the slope and a dashed teal W cos θ into it, and a purple normal reaction R pushing out from the slope.
@use:physics

#Constructs

physics.force
One labelled force: an arrow of a given length, from a point, at a bearing. The whole of a free-body diagram is several of these at one point, which is why it is this rather than a construct taking four forces at once — a figure with three forces should not have to leave a fourth blank.
A free-body diagram: four arrows from one point — N up in teal, W down in red, F right in orange, and a dashed purple f to the left.A free-body diagram: four arrows from one point — N up in teal, W down in red, F right in orange, and a dashed purple f to the left.
magnitude
The arrow's length, in graph units rather than newtons.
Default2
bearing
The arrow's direction, in degrees anticlockwise from the right.
Default0
x
The arrow's starting point, x coordinate.
Default0
y
The arrow's starting point, y coordinate.
Default0
label
The force's label.
inline
Default
style
The arrow's stroke.
enum
Defaultsolid
width
The arrow's line width.
Default2
colour
The arrow's colour.
paint
Defaultred
physics.resolve
A force with its two components drawn dashed beside it, and the right angle between them marked. along is the direction the components are taken in — 0 for the ordinary horizontal and vertical pair, the slope's angle for a block on a slope, which is the case the resolution exists for. The arithmetic is the point: the parallel component is Fcos⁡(θ−α)F\cos(\theta - \alpha) and the perpendicular one Fsin⁡(θ−α)F\sin(\theta - \alpha), and getting the sign of that difference right by hand is where the figure usually goes wrong.
A red force F at 55° from the origin, with its dashed orange horizontal component F_x, its dashed teal vertical component F_y, and a right angle marked between them.A red force F at 55° from the origin, with its dashed orange horizontal component F_x, its dashed teal vertical component F_y, and a right angle marked between them.
magnitude
The force's length, in graph units rather than newtons.
Default3
bearing
The force's direction, in degrees anticlockwise from the right.
Default55
along
The direction the components are resolved in, in degrees — the slope's angle for a block on a slope.
Default0
x
The force's starting point, x coordinate.
Default0
y
The force's starting point, y coordinate.
Default0
label
The original force's label.
inline
Default$F$
parallel-label
The component along along's label.
inline
Default
perpendicular-label
The component perpendicular to along's label.
inline
Default
colour
The original force arrow's colour.
paint
Defaultred
parallel-colour
The parallel component's colour.
paint
Defaultorange
perpendicular-colour
The perpendicular component's colour.
paint
Defaultteal
physics.incline
A block on a slope: the ground, the incline, the block sitting on it and the angle at the foot. The block is a rectangle turned to lie on the slope, so its corners come out of the slope's own direction and normal rather than being written down — which is what a hand-drawn version of this figure never quite manages. at is how far along the slope it sits, as a fraction.
A blue slope rising at 30° from grey ground, the angle θ marked at its foot, with an orange square block lying on the slope a little past halfway up.A blue slope rising at 30° from grey ground, the angle θ marked at its foot, with an orange square block lying on the slope a little past halfway up.
angle
The slope's angle to the ground, in degrees.
Default30
base
The horizontal length of the ground the slope rises from.
Default6
at
How far along the slope the block sits, as a fraction from 0 to 1.
Default0.55
block
The block's side length.
Default1
x
The foot of the slope's x coordinate.
Default0
y
The foot of the slope's y coordinate.
Default0
label
The angle at the foot's label.
inline
Default$\theta$
colour
The ground segment's colour.
paint
Defaultgrey
slope-colour
The slope and its angle mark's colour.
paint
Defaultblue
block-colour
The block's colour.
paint
Defaultorange
physics.pendulum
A pendulum hanging from a pivot: the string at an angle FROM THE VERTICAL, the bob, the vertical it swings about, and the angle between them.
A pendulum hanging from a grey pivot: a blue string of length l swung 25° from the dashed vertical, the angle θ marked at the pivot, and an orange bob at its end.A pendulum hanging from a grey pivot: a blue string of length l swung 25° from the dashed vertical, the angle θ marked at the pivot, and an orange bob at its end.
angle
The string's angle from the vertical, in degrees.
Default25
length
The string's length.
Default4
bob
The bob's size.
Default14
x
The pivot's x coordinate.
Default0
y
The pivot's y coordinate.
Default5
label
The angle between the string and the vertical's label.
inline
Default$\theta$
length-label
The string's label.
inline
Default$l$
colour
The pivot point and the vertical dashed line's colour.
paint
Defaultgrey
string-colour
The string and its angle mark's colour.
paint
Defaultblue
bob-colour
The bob's colour.
paint
Defaultorange
physics.projectile
A projectile's flight: the trajectory, the apex, and the range, from a launch speed and an angle. Everything but the curve is a consequence of those two — the range is u2sin⁡2θ/gu^2\sin 2\theta / g and the apex u2sin⁡2θ/2gu^2\sin^2\theta / 2g — so the markers land where the curve actually goes rather than where they were dragged.
A blue parabolic trajectory launched at 45° with a red launch arrow u, a teal apex point H with a dashed line down to the ground, and a brace under the flight marking the range R.A blue parabolic trajectory launched at 45° with a red launch arrow u, a teal apex point H with a dashed line down to the ground, and a brace under the flight marking the range R.
u
The launch speed.
Default20
angle
The launch angle above the horizontal, in degrees.
Default45
g
The acceleration due to gravity.
Default9.81
label
The trajectory curve's label.
inline
Default
apex-label
The apex point's label.
inline
Default$H$
range-label
The range brace's label.
inline
Default$R$
launch-label
The launch velocity vector's label.
inline
Default$u$
colour
The trajectory curve, the range point and the brace's colour.
paint
Defaultblue
apex-colour
The apex point and its dropped segment's colour.
paint
Defaultteal
launch-colour
The launch velocity vector's colour.
paint
Defaultred
physics.vt-displacement
A velocity–time graph under constant acceleration, with the area under it shaded: the displacement, which is what the area IS. The line is a curve rather than a line so that integral can shade under it — the area is sampled from the curve itself, so it follows the line however the acceleration changes.
A velocity–time graph: a blue line v = u + at rising from 2 at t = 0 to 11 at t = 6, with the area under it shaded teal and labelled s = 39.A velocity–time graph: a blue line v = u + at rising from 2 at t = 0 to 11 at t = 6, with the area under it shaded teal and labelled s = 39.
u
The initial velocity.
Default2
a
The constant acceleration.
Default1.5
from
Where the shaded area starts, along the time axis.
Default0
to
Where the line is drawn to, and where the shaded area ends.
Default6
label
The velocity line's label.
inline
Default$v = u + at$
area-label
The shaded displacement area's label.
inline
Default$s$
colour
The velocity line's colour.
paint
Defaultblue
area-colour
The shaded displacement area's colour.
paint
Defaultteal
show-value
Print the displacement on the shading, beside its label. Off by default: the number is always available to prose through the call's id, and a figure that states it as well is a choice about that figure.
bool
Defaultfalse
physics.wave
A travelling wave, with its amplitude ruled across and its wavelength braced along the axis. phase moves the wave along without changing anything else, so a step can show the same wave a quarter period later.
Three wavelengths of a blue sine wave of amplitude 2, with a grey line ruled across at its amplitude A and a grey brace along the axis marking one wavelength λ.Three wavelengths of a blue sine wave of amplitude 2, with a grey line ruled across at its amplitude A and a grey brace along the axis marking one wavelength λ.
amplitude
The wave's amplitude.
Default2
wavelength
The wave's wavelength.
Default4
phase
How far the wave is shifted along the axis, without changing anything else.
Default0
from
Where the wave is drawn from, along the axis.
Default0
to
Where the wave is drawn to, along the axis.
Default12
label
The wave curve's label.
inline
Default
amplitude-label
The ruled amplitude line's label.
inline
Default$A$
wavelength-label
The braced wavelength's label.
inline
Default$\lambda$
colour
The wave curve's colour.
paint
Defaultblue
marks-colour
The amplitude rule and the wavelength brace's colour.
paint
Defaultgrey
physics.thin-lens
A thin converging lens with the three construction rays and the image they meet at. The image is where the lens equation puts it: v=uf/(u−f)v = uf/(u - f), with the height scaled by −v/u-v/u — so the rays meet AT the image rather than near it, which is the one thing a hand-drawn ray diagram cannot promise. Distances are positive: the object stands u to the left of the lens, the focal points at ±f\pm f either side. The real-image case, so u must be greater than f. Nearer than the focal point the rays diverge and the image is virtual — a different construction, with the rays extended back rather than crossing.
A ray diagram for a converging lens: a teal object arrow O to the left, the focal points F either side, three orange construction rays through the blue lens, and the inverted purple image I where they meet on the right.A ray diagram for a converging lens: a teal object arrow O to the left, the focal points F either side, three orange construction rays through the blue lens, and the inverted purple image I where they meet on the right.
u
The object's distance to the left of the lens.
Default9
f
The lens's focal length, the same either side.
Default3
h
The object's height.
Default2
aperture
The lens symbol's half-height, drawn to scale with the figure rather than the optics.
Default2.6
fill-style
How the lens symbol is filled — outlined leaves it empty.
enum
Defaultoutlined
object-label
The object arrow's label.
inline
Default$O$
image-label
The image arrow's label.
inline
Default$I$
focus-label
Both focal points' label.
inline
Default$F$
colour
The axis and the focal points' colour.
paint
Defaultgrey
lens-colour
The lens symbol's colour.
paint
Defaultblue
ray-colour
The three construction rays' colour.
paint
Defaultorange
object-colour
The object arrow's colour.
paint
Defaultteal
image-colour
The image arrow's colour.
paint
Defaultpurple
physics.refraction
Refraction at a boundary: the incident ray, the normal, and the refracted ray at the angle Snell's law puts it, with both angles marked. The refracted angle is arcsin⁡(n1n2sin⁡θ1)\arcsin\left(\frac{n_1}{n_2}\sin\theta_1\right), worked out here rather than by the author — so the ray bends towards the normal when it should, and by as much as it should. Both angles are measured FROM THE NORMAL, as they are in the subject. The boundary runs along y=0y = 0 with medium 1 above it.
An orange ray meeting a horizontal boundary at 40° from the dashed normal, and the purple refracted ray bent towards the normal below it, the two angles θ₁ and θ₂ marked.An orange ray meeting a horizontal boundary at 40° from the dashed normal, and the purple refracted ray bent towards the normal below it, the two angles θ₁ and θ₂ marked.
angle
The incident ray's angle from the normal, in degrees.
Default40
n1
The refractive index of the medium the incident ray travels through.
Default1
n2
The refractive index of the medium the refracted ray travels through.
Default1.5
length
Both rays' length.
Default4
span
How far the boundary and the normal are drawn either side of the point of incidence.
Default5
incident-label
The incident ray's label.
inline
Default
refracted-label
The refracted ray's label.
inline
Default
normal-label
The normal's label.
inline
Default
angle-label
The incident angle's label.
inline
Default$\theta_1$
refracted-angle-label
The refracted angle's label.
inline
Default$\theta_2$
colour
The normal's colour.
paint
Defaultgrey
boundary-colour
The boundary's colour.
paint
Defaultneutral
ray-colour
The incident ray and its angle mark's colour.
paint
Defaultorange
refracted-colour
The refracted ray and its angle mark's colour.
paint
Defaultpurple

Last updated