Widgets

How to Add a Projectile Motion Simulator to Your Website

LK Forge · 4 min read · Updated September 2026

You can add a full projectile motion simulator to any website, blog, or classroom page with a single line of code — free, with no sign-up, no plugin, and no script to install. Visitors drag on the canvas to aim, let go, and watch the parabola while range, apex and flight time update live. This guide covers the fastest way to embed the tool, what it shows, and where it works.

The quickest way: paste one embed snippet

An embed is just an <iframe> that loads the simulator from lkforge.com, plus a small credit line. Copy this into your page’s HTML where you want the widget to appear:

<iframe src="https://lkforge.com/embed/projectile-motion/"
        width="100%" height="840" loading="lazy"
        style="border:0;max-width:560px"
        title="Projectile Motion Simulator by LK Forge"></iframe>
<p><a href="https://lkforge.com/tools/physics/projectile-motion/">Projectile Motion Simulator</a>
   by <a href="https://lkforge.com/">LK Forge</a></p>

The <iframe> is the live simulator; the <p> underneath is a plain credit link. Keep that line — the visible link is what keeps the widget free to embed. You can also copy this exact code straight from the LK Forge widget gallery.

What the widget shows

The simulator opens ready to aim, so a visitor can fire a shot straight away and then tune the physics:

  • Drag to aim: pull on the canvas to set the launch angle and speed by hand, then release to launch.
  • Angle, speed, gravity: sliders change the launch angle, the launch speed and gravity live, so a flat fast shot and a high lazy one are easy to compare.
  • Air-resistance toggle: switch on quadratic drag and the tidy parabola bends into a shorter, asymmetric path integrated step by step.
  • Range, apex, flight time: a readout reports how far the projectile travels, how high it climbs and how long it stays in the air.

Pick the right height

The snippet uses height="840", which fits the canvas, the launch controls, the sliders and the readouts without clipping even on a narrow phone, where they stack into one column. On a wider page the widget centres within its max-width:560px. That single height works across screen sizes, so there is nothing to tweak for mobile.

Where it works

Because it is a standard iframe, the embed works anywhere you can add HTML:

  • WordPress: add a Custom HTML block and paste the snippet.
  • Squarespace: use a Code / Embed block.
  • Wix: add an Embed HTML / iframe element.
  • Ghost: insert an HTML card.
  • Notion: paste the /embed/projectile-motion/ URL and choose "Create embed".
  • Plain HTML, an intranet, or a lesson page: paste the snippet straight into the markup.

That’s the whole job. Copy the embed code from the widget gallery and paste it wherever a physics lesson or a blog post on kinematics, gravity or trajectories needs an arc students can actually aim and fire.

Grab the embed code from the LK Forge widget gallery — free, no sign-up.

Open the Projectile Motion Simulator

Frequently asked questions

Is embedding the projectile motion simulator free?
Yes. It is free to embed on any site, with no account, no API key and no usage limits. The whole simulation runs in your visitor’s own browser, so there is no server cost — we only ask that you keep the small "Projectile Motion Simulator by LK Forge" credit line that comes with the embed code.
What can visitors do with the embedded simulator?
They can drag on the canvas to set the launch angle and speed, press launch and watch the parabola play out, and read the range, the height of the apex and the total flight time off a live panel. Sliders adjust the angle, launch speed and gravity, and an air-resistance toggle bends the clean arc into a shorter, lopsided path.
Does the embed show why 45° gives the maximum range?
Yes — that is its main teaching point. With air resistance off, a 45° launch covers more ground than any other angle, and any two angles that add up to 90° (say 30° and 60°) land in the same spot. Switch air resistance on and both facts shift: the best angle drops below 45° and the arc loses its symmetry.
What iframe height should I use, especially on mobile?
The snippet ships with height="840", which is tall enough that the canvas, the launch controls, the sliders and the readouts all fit without clipping even on a narrow phone, where everything stacks into a single column. On a wider page the widget simply centres within its max-width of 560px. You can lower the height if you want it shorter, but 840 is the safe default across screen sizes.