The Life Starter
0 of 6 complete0%
Course Library · Lesson 5 of 6
Create · Guided lesson

Control motion and describe the artwork

About 36 minutes · 6 reading + 30 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
See this course’s project requirements

An original interactive geometric artwork with palette and spacing controls, optional motion, a text description, inspected PNG and runnable source.

Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.

What to include

  • Coordinate, grid-count and edge-fit calculations.
  • Two intentional original composition choices.
  • Equivalent pointer/button/keyboard controls with boundary tests.
  • Optional motion, pause and useful text support.
  • Inspected PNG plus complete source and dependency notes.

Review and revise

Use these criteria to check your work and choose what to improve.

  • The layout matches its calculations and fits the canvas.
  • Controls update bounded state consistently.
  • Motion and text support are usable and explained.
  • Image and source handoff are complete.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

Create Tile Garden, an original geometric artwork with optional motion and multiple control routes.

The idea

Animation changes a parameter over time; pause stops that change while other controls remain usable.

Follow along

Control motion and describe the artwork — guided practice

Add optional time-based change, a reliable pause and a useful text alternative.

Save index.html and sketch.js from the practice files in the same new folder. Open index.html in a modern browser while online; the page loads the free p5.js 2.3.3 library from the CDN URL listed by the official download page. No account is needed. If you need offline use, download that library as p5.min.js from the official page and change only the library script src to p5.min.js. Edit sketch.js with a plain-text code editor, save, and reload the page after code changes. Use browser developer tools Console to inspect errors. Restore the original constants after each changed case unless instructed otherwise.

  1. 1. Inspect the starting state

    Reload the original page and read paused=true and phase 0.

    You should see: Motion starts paused; the composition and controls are visible.

    A person can choose whether to start motion rather than being forced into it.

  2. 2. Start and pause

    Click Start motion, observe gentle circle-size changes, then click Pause motion. Change palette while paused.

    You should see: Size changes stop, but palette still updates.

    draw continues while paused; only phase advancement is stopped.

  3. 3. Trace elapsed time

    Read Math.min(deltaTime,100)/1000. For deltaTime 50 milliseconds, calculate the phase increment.

    You should see: The phase advances 0.05 when motion runs.

    Conversion to seconds gives a consistent time unit; the cap limits a large jump after a slow frame.

  4. 4. Inspect the text support

    Read the describe call, the visible instructions, canvas label and text status. Use Tab to test focus and motion button operation.

    You should see: The text identifies the motif and controls; the motion button’s label and aria-pressed reflect its state.

    Canvas pixels need an accompanying explanation, and controls need their current state conveyed.

Now change one thing

For a running frame with deltaTime 80 milliseconds, enter the phase increment from the supplied expression.

Your work

What to finish

A motion/pause test and a reviewed text description with keyboard evidence.

Common mistake

Watch for this

Stopping every redraw on pause can accidentally freeze palette and spacing changes too.

How can I tell I understand it?

Complete the changed case, explain your result, and pass the three application checks.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1Why does this sketch keep draw running while paused?
2The expression is 20+6*sin(...). Since sine ranges-1 to 1, the diameter range is?
3Does calling describe alone complete every accessibility requirement?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
5
Finish this lesson

Pass the check. We’ll save the progress.

Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.

Go to the knowledge check
Optional course overview video · same video as Lesson 1
The Coding TrainCreative Coding for Beginners with p5.js (1.1)YouTube
Optional course overview

Creative Coding for Beginners with p5.js (1.1)

From The Coding Train. Watch here or open it on YouTube .

Optional course overview. Follow the written steps below at your own pace.
Tools, templates, and lesson sources

Tools and templates

Tools open in a new tab so you can keep your place here.

Sources and further reading

Explore the references behind this lesson.

p5.js: Variables and Change
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: Using variables to change visual output.

Access: Free public web page; no paid enrollment required.

Reuse: Public reference; link only. LifeStarter prose, exercises and files are independently authored.

p5.js: describe() reference
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: A text description of the canvas for accessibility.

Access: Free public web page; no paid enrollment required.

Reuse: Public reference; link only. LifeStarter prose, exercises and files are independently authored.

Report a problem with this lesson

Tell us what went wrong. Please leave out personal information and private project contents.

No sign-in needed.