Make a science simulation with AI and give your students a link

Quick answer

Yes, ChatGPT, Claude, and Gemini can make a physics simulation students can open. Ask for one HTML file with a canvas animation, sliders, the formula on screen, and no outside data. Publish that file, and students open it in the browser on a Chromebook, an iPad, or a phone with no account. In a test on October 17, 2026, simulations built on p5.js, Matter.js, three.js, and Chart.js, loaded from cdnjs or jsDelivr, all ran under the security headers a published Convika page sends; a call to another website and eval did not. If PhET already has the simulation, use PhET, which is free and runs in the browser. Make your own simulation for what PhET does not cover or to match your lesson's numbers, and check the physics before class. The box on this page checks the file without a signup; its link works 3 minutes and runs none of the simulation's scripts.

Get a link for my simulation

Free plan: no credit card, 1 published page, 10,000 pageviews a month.

On this page

PhET has a projectile simulation, but it does not include your worksheet's numbers for the exact lesson planned. You ask Claude or ChatGPT for one, and it works on your laptop. Now 30 students need to open it on their Chromebooks. A shared chat link or an .html attachment does not get them there.

This page explains when to use PhET instead. It guides you on asking the AI for a simulation that runs once it leaves the chat. It details which libraries ran under a published page's security headers in a test. It also covers checks before class and giving students a link. PhET's pages were read October 17, 2026.

When PhET already has it, use PhET

PhET says it provides “fun, free, interactive, research-based science and mathematics simulations,” written in HTML5 so they run in the browser. Its home page counts 173 simulations and 132 language translations. According to its licensing page, students and educators “can use the simulations for free for any non-commercial purposes, including classroom use, homework, student projects, etc.”

An AI-made simulation is worth the effort when:

  • PhET doesn't have the topic, or not at your students' level.
  • You want your lesson's numbers on screen: the mass from the worksheet, or the angle from the exam question.
  • You want one thing on the page, without the controls a general simulation needs.

Ask the AI for one HTML file

Paste this into ChatGPT, Claude, or Gemini, and replace the first line with your topic:

Make a physics simulation for my class: a ball launched at an angle (projectile motion).
Requirements:
- One HTML file, with all CSS and JavaScript inside it.
- Draw it on a canvas. If you use a library such as p5.js, Matter.js, or three.js, load it from cdnjs or jsDelivr over https.
- Sliders for the launch speed (5 to 30 m/s) and the angle (10 to 80 degrees), and Start and Reset buttons.
- Show the formula and the current values on screen, with units. Use g = 9.8 m/s².
- Move things by the time elapsed between frames, not a fixed step per frame.
- Fit a phone screen, and work with taps as well as a mouse.
- Don't load data from other websites, and don't use eval or new Function.

Here are other first lines that fit the same requirements:

  • “Adding two velocity vectors, with arrows for each vector and the resultant.”
  • “A cart with uniform acceleration, with a velocity–time graph drawn as it moves.”
  • “Newton's second law: a box pushed by a force on a frictionless floor, with F = ma shown.”

The line about time matters more than it looks. A simulation that moves a fixed step each frame runs at the speed of the screen's refresh rate. It runs faster on a 120 Hz iPad than on a 60 Hz Chromebook. 2 students then see different motion for the same numbers.

What ran under a published page's security headers

A test on October 17, 2026 checked 4 simulations in English and 4 in Japanese. A local server served them with the same security headers a published Convika page sends. Claude wrote all 8 test files from the prompt above and its Japanese version. None were made in ChatGPT or Gemini. The test opened each file in Chromium, using a desktop window and a Pixel 7 phone profile, and in WebKit, the engine of Safari, with an iPad profile. Each had to animate. Moving a slider had to change the numbers on screen. Nothing was published for the test. The Free plan's bar, the cookie notice, and Convika's visit counting were not on the test pages.

LibraryLoaded fromChromium, desktopChromium, phoneWebKit, iPad
p5.js 1.11.1cdnjsRanRanRan
Matter.js 0.20.0cdnjsRanRanRan
three.js 0.170.0 (WebGL)jsDelivrRanRanRan
Chart.js 4.4.1jsDelivrRanRanRan
No library, canvas only—RanRanRan
  • Blocked: A request to another website (fetch), eval, and new Function. A published Convika page sends requests only to its own address and runs no code built from text. A simulation loading live data, or a library needing either, won't work.
  • Kept: A value saved in the browser (localStorage). A best score or the last settings stay on that one device.
  • Not tested: A published page, a real Chromebook, and an iPad. The engines are the same, but a school's settings and filters were not part of the test.
  • 3D needs WebGL. The test's headless Chromium had no graphics hardware. three.js showed nothing until software rendering was turned on. If a 3D simulation shows a blank area on an older device, ask the AI for the same thing in 2D with p5.js or a plain canvas.

Check the physics before class

The AI writes code that runs. It does not always get the physics right. Check the simulation before students see it:

  • Read the formula on screen against your own notes, and work one value by hand. For the projectile above at 20 m/s and 45°, the range should be 20² × sin 90° ÷ 9.8 ≈ 40.8 m.
  • Move every slider to both ends. Test a zero mass, a zero angle, or a negative acceleration. This shows where a simulation divides by zero or runs backwards.
  • Look at the signs and units. Check that up is positive or negative, consistently. Ensure every number on screen has its unit.
  • Watch it on a phone. Sliders that work with a mouse can be too small to drag with a finger.

If you find something wrong, tell the AI what you saw: “the range at 45° shows 81.6 m; it should be 40.8 m”. Ask for the whole file again.

Publish the simulation in 4 steps

1. Drop the file or paste the code

Drop the .html file in the box at the top of this page, or switch to Paste code and paste it there. Click Get my preview link. You can upload one .html or .htm file up to 2 MB, with no account. When you see “Your preview is ready,” open it and check the layout. The preview runs none of the page's scripts, so the simulation will not move there. This link works 3 minutes. It is for checking, never for students.

2. Keep the page and run it

Click Keep this page — free, no card above the preview link, then sign up. The page moves into your account as uploaded, with scripts on. Go to the page's screen in the dashboard and click Open preview. Now you can run the simulation with every slider.

3. Publish it

Click Publish, and a dialog asks who can open the page. Public is free: students with the link open the simulation without a login or password, and it may show up in search results and in Convika's gallery. To keep it out of both, choose Private link (Pro or pass). If you want a password, pick Only people with the password (a Pro feature at $12 a month). Make your choice and click Publish again in the dialog—you can switch to Public anytime in Site settings. The simulation is then live at an address like yourpage.convika.page. The Free plan asks for no credit card and includes 1 published page. On Free, a small Convika bar sits at the bottom of each page. Pro removes it.

On the page's screen, find the address under Live URL and click Copy next to it. Click Show QR code to project a code students scan with an iPad or a phone. Click Download PNG to put the code on a slide or a worksheet. Students need no account.

Getting it to your students

  • Google Classroom. Post the address as a link in a material or an assignment: how to post a game in Google Classroom.
  • A QR code on the board. Display the code for scanning in class, step by step: How to turn an HTML file into a QR code.
  • Try it on one student device first. A school web filter can block a site it has not categorized. If the page does not open, ask whoever runs the filter to allow its address.
  • Keep names and grades off the page. Anyone with the address can open it. To keep it to your class, select Only people with the password when publishing. Passwords are part of Pro ($12 a month).

A simulation is for exploring and checking answers. The page cannot send anything to you. If you need each student's results, collect them in a Google Forms quiz next to it.

A student finds the graph's units are wrong. Fix it in the AI, then go to the page's screen. Under New version from a file, drop the new file or switch to Paste code. Click Upload as a new version. A card says “Preview v2 is ready,”. Click Open preview, and then click Publish v2 at the same link. The address and QR code stay the same. Uploading uses no AI credits. Do not use Upload an HTML file in the dashboard for a fix: it makes a new page at a new address.

A colleague in your department wants it too. Copies are off until you turn them on: on the page's screen, go to Copies of this page in Site settings and tick Let people make their own copy of this page. The live page then shows “Make your own copy of this page, free” at the bottom. A colleague who clicks it gets their own copy to change, with your page's title and link on it. A page with a password can't be copied.

Frequently asked questions

Can ChatGPT make a physics simulation?

Yes, ChatGPT can make a physics simulation if you ask for 1 HTML file with a canvas animation, sliders, and the formula on screen. ChatGPT, Claude, and Gemini all write this kind of file. Check the physics before using it. Once you publish the file and share the link, students open it in the browser without an account.

Is there a free alternative to PhET?

PhET itself is free for classroom use and runs in the browser, so use it when it has the simulation. An AI-made simulation fills the gaps for a topic PhET does not cover, your own numbers, or 1 idea per page. Publishing on Convika's Free plan costs nothing.

Do students need an account to open it?

No, students do not need an account to open it. A published Convika page is an ordinary web page, so students open the link or scan the QR code on a Chromebook, an iPad, or a phone. You need a free Convika account to publish. Convika accounts are for users 13 and over, and anyone under 18 needs a parent's or guardian's consent.

Will it work on school Chromebooks and iPads?

In a test under the headers a published page gets, simulations built on p5.js, Matter.js, three.js, and Chart.js ran in Chromium and WebKit. The test evaluated those browser engines rather than physical Chromebooks and iPads. A school filter can still block the site, so open the link on 1 student device before class. 3D needs WebGL, so ask the AI for a 2D version if the screen shows nothing.

Can I use p5.js or three.js?

Yes, you can use p5.js or three.js loaded from cdnjs or jsDelivr over https. Ask the AI to keep everything else inside the 1 HTML file. A library that loads data from another site, or needs eval, will not run on a published page.

Can the simulation save students' results?

The simulation this guide asks for saves results only in the browser of the device it runs on, with localStorage. A published page cannot send data to another website, so it cannot collect results for you. Use a Google Forms quiz for per-student answers.

Next step

How to password protect an HTML page without code, on your own domain

JavaScript passwords sit in the page code. Put an HTML page from ChatGPT or Claude behind a server-checked password on your own domain.

Related articles

More ways to hand out pages in class

Share this article

Give your class the simulation

Upload the HTML the AI wrote and publish it. Students open it in the browser with no account. A fixed version keeps the same link and QR code.

Get a link for my simulation

Free plan: no credit card, 1 published page, 10,000 pageviews a month.