fig. 04 pen YWdjXr

Triangled

Two counter-rotating equilateral triangles with breathing radii; every vertex of one is tied to every vertex of the other.

original “Triangled” codepen.io/izmaelmag/pen/YWdjXr ↗

● running

§1 About

A small pen with one odd constant. The outer triangle turns one way, the inner one the other, and both radii breathe on a sine of the same angle — but the inner one is offset by 90, read in radians.

That typo-looking offset is what keeps the figure alive: the pair never reaches the same size at the same moment, so the nine connectors keep shearing into new stars.

§2 Maths

rotation
θ −= π / 360 · 0.2
outer radius
r1 = 100 · sin θ + 500
inner radius
r2 = 100 · sin(θ + 90) + 200 (90 rad ≈ 117°)
outer vertices
Vₖ = C + r1 · (cos(θ − 2πk/3), sin(θ − 2πk/3))
inner vertices
the same with r2 and −θ
connectors
3 × 3 lines, outer Vᵢ → inner Vⱼ

§3 Adaptation

  • Radii are scaled so 1 100 px of pen space fits the stage’s short side; only the peaks of r1 poke past the edge, as they did on a laptop window.
  • Stroke stays #bbb at 1 px, on the archive’s dark stage rather than the default white page the pen sat on.
  • The +90 radian phase and the missing beginPath() before the connectors (which strokes the inner triangle twice) are kept as written.