READER EDITION / ISSUE 002 / Revised 2026-11-20
Creative Agentic Computing
CodeFarmer / Issue 002
PROMPT-IN 001 / INSIDE THE PROGRAM

A curve
with a memory.

By Alvin

A point is an agreement

x = 420 + 245*cos(a*t) + r*cos(b*t)
y = 420 + 245*sin(a*t) - r*sin(b*t)

Here a and b are the two turn counts, r is the inner-circle radius in pixels, and t marks progress through a cycle from 0 to 2*pi. The number 420 places the center on the canvas; 245 sets the outer radius. Pausing stops progress while preserving the curve already drawn.

Export the thing you can see

The SVG uses the same point function and the current progress value. A separate export formula could drift away from the display. Here, both views share the mechanism.

An interesting next test

Change the turn sliders to allow fractions. The old claim that every trace closes after one cycle will fail. Decide whether the program should draw longer, explain that an open path is expected, or restrict the inputs again.