Gallery

71 figures · Open a figure to explore its code.

layout (11)

geometry (10)

plotting (16)

maps (9)

networks (6)

text (5)

math (12)

api (2)

(pendulum_physics)

Pendulum Physics

A pendulum diagram with a clipped support, angle arc, equilibrium line, bob, force arrows, and equation of motion. Change angle or length to move the rod, bob, and force annotations together.

The drawing uses a downward-facing Graph so its data coordinates match the diagram's pixel proportions. alongRod derives positions from the pivot and angle. Polyline draws the rod and equilibrium line in that coordinate system; Arc uses the same center and screen-space angles.

The layout uses explicit pixel dimensions and font sizes. The bob and its label are separate siblings inside the graph; frames accept a single content element. The enclosing rounded Frame clips the support while keeping its border inside the frame. Arrowheads use head-size and inherit their shaft's color.

The faint grid uses opacity; separate stroke-opacity and fill-opacity props are not currently supported by the shared paint style.

View the source.