Friends & Enemies

Every dot picks one friend and one enemy, and knows nothing else. Each step it drifts a little toward the centre of the room, takes a large step toward its friend and a small step away from its enemy. Now and then one dot re-picks. The same rules run in 2, 3, 4, or 5 dimensions — pick a space with the buttons below. Only three axes are drawn at a time, so in 4D/5D use the turn sliders to swing the hidden axes into view, the slab sliders to slice a section of them, or enable the grand tour to walk through every projection automatically. Drag to orbit, scroll to zoom.

Space

2D holds z at zero and locks the camera face-on. 3D is the full room. In 4D and 5D the extra axes (w, v) are invisible until you swing them in with the turn sliders below, slice them with the slab, or let the grand tour rotate through every projection.

turn x into w
turn y into w
turn z into v
leg length
slab centre
slab width

Only three axes can be drawn. The slab keeps a slice of w and drops the rest — sweep the centre to read the fourth axis one section at a time. The two turn sliders instead swing w into view, trading x or y away for it.

Steps
toward friend
away from enemy
toward centre
Step law

Population
dots2178
re-pick every
steps per frame
View
lens
opacity
colour by
colour set

step0
spread (room widths)0.00
space3d
view0° / 0°
tour leg—
verdict—
fps—

Space pauses. R resets. R with shift re-picks all. H hides this panel. Drag to orbit, scroll to zoom.

GitHub