• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

MORPH LISP: Tweened Animation Between Two Line Drawings

August 6, 2026

Draw the same shape twice — once as it starts, once as it ends — on two different layers. MORPH walks one into the other over as many frames as you ask for, snapping a slide at each step and writing a script that plays them back.

What MorphFrames does

Classic tweening: you draw the two extremes and the machine draws everything in between. Useful for a door swinging, a mechanism travelling, a roof unfolding, or any before-and-after you want to show as movement rather than two pictures.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Draw the start frame on one layer.
  3. Copy the whole thing to the end layer, then edit the copy. That preserves the drawing order, which is how the lines get paired.
  4. Type MORPH, name the two layers and give a frame count.
  5. Run the script it writes to play the animation back.

How it works

Lines are paired in the order they were drawn: the first line on the start layer morphs into the first on the end layer, the second into the second, and so on. So draw them in the same order — which the copy-then-edit method guarantees.

If the two layers hold different numbers of lines, the extras are ignored and you are told how many were dropped.

Each frame is interpolated straight from the two extremes:

p(f) = start + (end - start) × (f - 1) ÷ (frames - 1)

Adding a fixed delta to the current position each time round instead accumulates rounding error across the run, and needs those deltas written to a scratch file and read back for every single frame — a 1987 memory saving that costs a great deal of disk work now. Interpolating from the ends is exact at both ends and needs no file at all.

The start geometry is put back where it began. An animation that finishes by leaving your start frame sitting at the end position, with no way back, has cost you the drawing you made it from.

Notes and limits

  • Lines only. Walking every entity and reading groups 10 and 11 means something entirely different on a circle or a piece of text.
  • Draw both frames in the same order. Copy and edit — do not redraw the second one.
  • No drawing files are written per frame, only slides.
  • One undo group, and the start geometry is restored.

Download and details

NameMorphFrames — tweened animation between two line drawings
DownloadMorphFrames.lsp — 11.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandMORPH
Requiresnothing beyond a CAD platform with AutoLISP.
Source size11.9 KB, 273 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • TURTLEDRAW LISP — another way of generating geometry procedurally
  • CLOCKFACE LISP — live animation drawn as temporary vectors
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in