Rubik's Snake

Collections
My list:
Drag to rotate  ·  Scroll to zoom

Rubik's Snake Help

Controls

DragRotate the figure
Shift+drag / right-dragPan
Scroll / pinchZoom
Two-finger swipePan (touch)

Editing

NameFigure name — populated when a figure is loaded; edit before saving
SegNumber of segments (2–200)
Code boxJoint angles: 0=straight 1=90° 2=180° 3=270°. One digit per joint (segments−1 digits total)
Undo the last digit edit; press repeatedly to undo all changes back to the loaded figure. Also Ctrl+Z / Cmd+Z.
Cursor markWhen you leave the code box (to rotate the snake), your cursor position is saved and shown as a gold bar. Clicking the code box returns the cursor there.
SaveSave the current name and code to My List (bottom of left panel). Updates the entry if the name already exists.

View

EditToggle edit mode: enables code editing and shows snake only up to the cursor position; digits to the right are treated as 0. Move the cursor to fold or unfold the snake step by step. Clicking the code box also enters edit mode. Auto-rotation stops on entry.
1,2,3Toggle segment number labels. While on, labels persist through Alt+rotations — each segment keeps its number. Numbers also appear temporarily on self-intersection (without turning the button on).
Toggle auto-rotation
chiralAppears when the figure's code sequence is not equivalent to its mirror image (swap 1↔3 in joints). Click to toggle the mirror view. A superscript * means the 3D shape itself is geometrically chiral — the solid cannot be rotated to match its mirror image.

Edit mode shortcuts

^→Automatically fold the snake (advance cursor right) at a steady pace, skipping straight joints
^←Automatically unfold the snake (advance cursor left) at a steady pace, skipping straight joints
↑ / ↓Increment / decrement the digit just left of the cursor (wraps 0–3), updating the snake immediately
→ / ←Move the fold cursor one step
Any other keyStop the automatic folding/unfolding
Alt+→ / Alt+←Cyclic rotation (closed loops) or shift with 0-padding (open snakes): changes which segment is first

Left panel

CollectionsBuilt-in figure sets (amber tabs) — always available
Load fileLoad one or more .txt figure files; each gets a blue tab
Click tabShow / hide the figures in that collection or file
My listYour personal working list — figures saved here with the Save button; name the list using the text box
↓ DownloadDownload My List as a .txt file using the list name
Click figureLoad and render it
× buttonRemove a figure from the list (undo available for 5 seconds)
↑ ↓ arrowsNavigate the figure list
EnterLoad the highlighted figure

Figure file format

One figure per line: Name code
Name must have no spaces. Code is digits 0–3.
Blank lines and lines starting with # are ignored.

Example:
# My figures
Ball 11331311313311331311313
Straight 00000000000000000000000