Parameters, animation, stages, and GIF/MP4 export
Animation lives in Eidolang rather than a separate canvas state. 2D, 3D, staged playback, and GIF/MP4 export share one timeline, keeping screen playback aligned with exported frames.
Parameter sliders
param r 1 range 0.5 4 step 0.1
circle c O radius rEvery param appears in Params. The figure reevaluates while dragging; release writes the value back to the command. Declare range for a useful complete slider interval.
Continuous animation
animate r duration 2s mode pingpongThe target must be a parameter or a bound object with writable freedom. Options include:
mode loop,pingpong, oronce;speedorduration;over t0 t1for a restricted interval.
Status-bar Play/Pause controls preview. Stop commits current animated values to literals as an undoable edit.
Staged presentations
stage givens duration 1.2s reveal fade
point A -3 0
point B 3 0
segment base A B
stage result duration 1.2s reveal draw
point M = midpoint(A, B)
hide base transition erase duration 0.6s- Objects before the first
stageare persistent background. reveal cut|fade|drawcontrols new objects.clearhides earlier stage objects without deleting dependency values.show/hidesupport cut, fade, draw/erase, and their own duration.
Staged scripts gain previous, play/pause, reset, next, and a full scrubber. Editing opens at the completed final state; Play from there restarts from stage one.
Export GIF and MP4
Open Export and select GIF or MP4:
- Choose Current view or Fit content; 2D also supports a custom rectangle.
- Decide whether to include the coordinate grid.
- Choose raster scale, frame rate, and either a preset or custom positive duration. Defaults come from Settings › Export defaults.
- A staged script exports its stage timeline; ordinary
animateexports one complete motion. - 3D additionally offers camera orbit.
Both formats render the same frames from the same timeline, so the choice is only about encoding. Duration initially comes from the script timeline, but the export dialog can override it with a preset or custom value. Eidograph caps the total frame count to protect memory and marks a capped export. Lower frame rate, duration, or raster scale to reduce size.
Choosing between GIF and MP4
| GIF | MP4 | |
|---|---|---|
| Encoding | palette, up to 256 colors per frame | H.264, full color |
| File size | grows quickly with length and detail | much smaller at the same length and scale |
| Playback | loops by itself anywhere images display | needs a video player; stays smooth for long or high-resolution clips |
| Good for | chat, forums, and issue trackers | slides, video editing, and lecture recordings |
Notes that apply to MP4:
- The video is silent and never transparent; the export dialog hides the transparent-background switch for both animated formats.
- H.264 needs even pixel dimensions, so an odd export width or height is rounded up by one pixel.
- Encoding uses the system's H.264 encoder. If the system cannot encode H.264 at the chosen size, the export reports an error and GIF remains available.
Keep animation robust
- Animate a parameter rather than a derived result.
- Keep the construction valid across the full range; arc endpoints, for example, must not coincide.
- Use moderate
samplesfor numeric intersections and surfaces. - Play from start and check Diagnostics before export.
- To keep a final pose, Stop to write current values, then save the project.
