Gemini Canvas Prompt: How I Built a Math Animation App (Exact Prompts)

One Gemini Canvas prompt gave me a working math animation app in about a minute. Four short follow-ups turned it into the tool I now run on Gossipfunda. Below is the exact prompt, every follow-up I typed, the errors Canvas showed, and how I fixed them, so you can build your own app the same way.

Can’t code? No problem. You don’t need to build anything to make math videos. Use the free graph animation maker here, type an equation and download an MP4 for YouTube or Shorts.

Watch the short video below to see the finished app make a math animation, then read the exact prompts that built it.

What Gemini Canvas does

Canvas in Gemini can write a full web app and show a live preview of it right in the chat. On March 18, 2025, Google said Canvas was rolling out globally to Gemini users and Gemini Advanced subscribers (Google announcement). I made this build on a Google AI Pro plan, and limits can differ by plan.

How to build an app with one Gemini Canvas prompt

1. Turn on Canvas

Go to gemini.google.com. Below the text box at the bottom, click Add files, then Canvas. Type your prompt in the text box and click Submit. I showed this menu step by step in my Gemini motion graphics guide.

Gemini home screen with the Canvas tool selected in the prompt bar before typing the graph animation prompt.
Canvas is on: the chip sits in the Gemini prompt bar.

2. Paste the master prompt

This is the exact prompt I used. Copy it as is, or swap the themes, the marker and the formats for your own idea. The trick is to describe every part of the app in plain words: input, animation, character, sound, colors, formats and export.

Build a "Math Graph Animator" app in Canvas. I type any math equation and it draws the graph on animated X and Y axes, like a motion-graphics video. Equations: an input box for one or more equations, like y = sin(x), y = x^2 – 3, y = 2x + 1, y = e^(-x/4) * cos(2x). Each equation gets its own color. Include 4 example buttons to load these with one click. Animation: the axes slide in with tick labels and a grid, then each curve draws itself smoothly from left to right with a glowing line. Speed slider and an X/Y range setting. Monkey marker: a cute cartoon monkey (drawn with canvas or SVG, no images) rides the tip of the curve as it draws and holds a small sign showing the live (x, y) value. When the curve slopes down he slides, when it goes up he climbs, and at peaks and dips he hangs from the line by one arm and swings for a moment. Sound: Web Audio tone that follows the graph as it draws: higher y means higher pitch, with a soft "pop" at each peak and dip. A mute button. Colors: theme picker (Dark Neon, Chalkboard, Clean White, Sunset) plus a color picker for each curve. Formats: toggle between 16:9 (1920×1080) for YouTube and 9:16 (1080×1920) for Shorts and Reels. The layout adapts to each. Export: a "Record Video" button that replays the full animation and records it with the browser's MediaRecorder API, sound included (MP4 H.264 if supported, otherwise WebM), then downloads it. No watermark.
Gemini Canvas working on the Math Graph Animator prompt with the status Refining canvas monkey animations.
Gemini plans the app (“Refining canvas monkey animations”).

3. Test the first version

In about a minute Gemini showed a working app with example buttons, a color for each curve, four themes and the monkey marker. My first test was the damped wave, and it drew right away.

First version of the Gemini Canvas math graph animator drawing a damped cosine wave with the monkey marker.
The first build drew the damped wave right away.
Gemini Canvas graph animator with y = cos x and y = sin(x) on the Clean White theme and the Export menu.
Two curves on Clean White, with the Canvas Export menu.

The 4 follow-up prompts I used (and what each fixed)

The first version was good, but the best features came from short follow-ups. These are my real prompts, typos included, because Gemini understood them anyway.

My follow-up promptWhat Gemini changed
I want to draw circle too, add volume buttonAdded circles and ellipses (like x^2 + y^2 = 9), a Circle example, and a volume button and slider
in 9:16 ration the circle looks like EllipseKept the X and Y scale 1:1 when you switch formats and added a 1:1 Grid button
I want to play two graph simultaneously, but the next one have cat as a markerAdded Sync ON/OFF, a cat marker for the second curve and a sin and cos example
what is this why u are geeting into so many errors?Gemini said small patches had broken the file and rewrote the whole app cleanly
Typing the follow-up prompt I want to draw circle too, add volume button in the Gemini Canvas chat.
Follow-up 1: circles and a volume button.

Fixing the stretched circle in 9:16

When I switched to 9:16, my circle turned into a tall ellipse. The cause was that the X and Y axes used different scales in the tall frame. One follow-up prompt fixed it: Gemini now keeps the scale 1:1 when you change formats and added a 1:1 Grid button.

Gemini Canvas math graph animator in 9:16 showing the circle x^2 + y^2 = 9 stretched into an ellipse.
The bug: in 9:16 my circle looked like an ellipse.
The same 9:16 graph after the fix, drawing a perfectly round blue circle with the monkey marker.
After one follow-up prompt, the 9:16 circle is round.

Two graphs at once with a cat marker

The third follow-up asked for two graphs at the same time with a cat on the second one. Gemini added a Sync ON/OFF switch, the cat marker and a sine and cosine example.

Gemini Canvas preview of the math graph animator with sin(x) and cos(x) drawing together and Sync ON.
Sync ON: sine and cosine draw together in my Gemini test.

When Gemini Canvas says Something went wrong

After a few follow-ups, Canvas sometimes showed a Something went wrong message. Clicking Fix error usually repaired it.

Gemini Canvas Something went wrong message with the Fix error button below the graph animator.
When it breaks, click Fix error first.

When the errors kept coming back, asking Gemini why worked better than clicking Fix error again. It said small patches had broken the file, rewrote the whole app cleanly, and the app worked from then on.

Gemini reply apologizing for the errors and rewriting the complete math graph animator file.
Asking why made Gemini rewrite the whole file.

My rule now: if Fix error fails twice, stop patching and ask Gemini to rewrite the complete file.

Advertisement

Test the video export inside Canvas

My prompt asked for an export button that uses the browser’s MediaRecorder API. In Chrome, it replayed the whole animation and saved a 1920 x 1080 MP4 with sound.

Gemini Canvas math graph animator recording a 1920x1080 MP4 of the Sunset theme damped wave.
Download Video saves a 1920 x 1080 MP4 with sound.

What I changed for the web version

The tool on Gossipfunda is Gemini’s final version, rebuilt so it loads fast inside an article. I removed the external style and font files and added a few options that Canvas didn’t have.

  • Video title: type a title and it shows on the video, like “Circle vs Sine vs Cosine”.
  • Line thickness and Hold at the end (how long the finished graph stays on screen).
  • Coordinates ON/OFF and Legend ON/OFF for a cleaner frame.
  • More markers: a glowing dot, a rocket, or no marker, next to the monkey and the cat.
  • A recording bar that shows the % done and reminds you to keep the tab open.
  • 3-curve race and 4 rings examples, a full-screen button, and keys: Space plays or pauses, R replays.

Tips for your own Gemini Canvas app

  • Describe the whole app in the first prompt. One complete prompt worked better for me than many small ones.
  • Ask for one change per follow-up, and test it before the next one.
  • Keep typos if you’re in a hurry. Gemini understood “ration” and “geeting” without trouble.
  • Ask for drawings in canvas or SVG with no image files, so the app works anywhere.
  • If you build your own copy, test it on your own account, because Gemini limits can differ by plan.

FAQ

Can Gemini Canvas build a working web app from one prompt?

Yes, in my case. One detailed prompt gave me a working math animation app with themes, sound and a monkey marker in about a minute. Short follow-ups then added circles, a 9:16 fix and two graphs at once.

Is Gemini Canvas free?

On March 18, 2025, Google said Canvas was rolling out globally to Gemini users and Gemini Advanced subscribers (its paid plan at the time). I built this app on a Google AI Pro plan. Limits can differ by plan, so test on your own account.

What should I do when Gemini Canvas shows Something went wrong?

Click Fix error first. If the error comes back, ask Gemini why it keeps failing and ask it to rewrite the complete file. That fixed my app for good.

How do I turn on Canvas in Gemini?

Go to gemini.google.com. Below the text box at the bottom, click Add files, then Canvas. Type your prompt and click Submit. You must be signed in to Gemini Apps.

Do I need to build the app to make math animation videos?

No. The finished tool is free on Gossipfunda. Type an equation, press Start and download the video. Building your own copy in Gemini Canvas is only for people who want to change it.

Make your first math video

Just want the videos? Skip the build and use the free graph animation maker here. It has every feature from this build log, plus the extra markers and the recording bar.

I post new AI builds on the Gossipfunda YouTube channel.