# Build and check a vertical-launch simulation in Google AI Studio

> Build a full vertical-launch simulation in AI Studio, inspect its generated code, verify exact math and controls, then share or release a checked revision.

By BIGCHANGE.AI Editorial

Published: 2026-10-23T12:38:18.184Z
Updated: 2026-10-23T12:38:18.184Z
Canonical: https://bigchange.ai/blog/google-ai-studio-vertical-launch-simulation-guide

![AI-generated conceptual charcoal illustration of one orange ball suspended above a level indoor gym floor, with its shadow directly below.](https://bigchange.ai/api/media/file/vertical-launch-concept-hero-v1.png)
AI-generated conceptual illustration by BIG CHANGE. No physical launch, measurement, AI Studio interface or app test is depicted.

Google AI Studio Build can generate a web app from a prompt, show a live preview and expose the generated files in a Code tab. A useful simulation needs more than a moving chart: its equations, controls, plotted point and saved release must agree. This guide gives an educator or builder a complete vertical-launch example, a copyable Build prompt, an independent HTML reference and cases to run against the generated app. [Google’s Build documentation](https://ai.google.dev/gemini-api/docs/aistudio-build-mode) describes the app-building route; the calculation and checks below are our own educational model.

## The big change

- **What changed:** Build can generate and revise a whole web app with source inspection and a live preview. The model here supplies a measurable specification for that generated app.
- **Why it matters:** The launch, apex and landing values can be checked against exact equations. The same checks expose a time slider that looks right but misses a fractional landing point.
- **What to watch:** Generated code may include dependencies, server paths or calls that the model does not need. Inspect the saved revision and run the controls in the actual preview before sharing or publishing.

## Before you start

You need an authorized Google AI Studio account with the web-app Build route, permission to use these public educational inputs, and a decision about who may see the result. Use only the invented model inputs below; do not enter personal data or secrets. Decide whether you want a private review, a project shared with named collaborators or a public Cloud Run service. Check your account’s actual deployment tier, capacity, quotas and likely charges before any publish action. [Google’s deployment guide](https://ai.google.dev/gemini-api/docs/aistudio-deploying) says eligible Starter Tier accounts can deploy up to two services without setting up a billing account, while standard deployment requires a linked Google Cloud project with billing. Eligibility varies by account. A client-only model needs no runtime Gemini call, but hosting may still have a cost.

The model assumes one object launched vertically from level ground at initial upward speed `v0`, with constant downward gravity `g`. It omits air resistance, horizontal motion, changing gravity, bounce and motion after contact. Its height is `max(0, v0*t − 0.5*g*t²)` until first landing. Apex time is `v0/g`, apex height is `v0²/(2g)`, flight time is `2*v0/g`, and signed velocity before contact is `v0 − g*t`. This is an educational calculation, not a prediction or an experiment. At `v0=20 m/s`, `g=10 m/s²`, apex is 2 s and 20 m, height at 1 s is 15 m, and landing is 4 s.

## 1. Generate and inspect the app

Open [AI Studio Build](https://aistudio.google.com/apps), select the web-app platform and paste the complete prompt below. It asks Build to create the model function, three controls, a changing height plot, a text summary and reset behavior. After generation, open the Code tab. Compare the function’s domain and equations with the prompt. Trace a slider change through the values, curve, marker and axes. Inspect the actual file list, packages, server routes, network destinations and secret handling. This task needs no runtime model call, database or persistence; remove an unapproved call or endpoint and review the changed files again. Save or export the exact revision you checked using the available project save, ZIP or GitHub route described in the [Build guide](https://ai.google.dev/gemini-api/docs/aistudio-build-mode).

If the generated math differs, give Build a specific failing case. For example: “At `v0=20 m/s`, `g=10 m/s²`, `h(1)` must be 15 m; show the model and plotting code you changed.” Inspect and retest the resulting revision. A generated statement that a test passed is not an observed test.

## 2. Check numbers, plot and controls in preview

Fill the acceptance table below against the generated preview, recording the actual values and revision. Reset to `20,10,0`, then inspect 1 s, apex and landing. The pure calculation must reject a direct request after landing: `model(20,10,5)` is invalid. A legitimate control change works differently. Starting at `20,10,4` and reducing speed to 10 must clamp the selected UI time to the new landing at exactly 2 s before calling the pure function.

The time control uses 10,000 integer ticks. Tick 0 is exact launch, tick 5,000 exact apex and tick 10,000 exact landing. With `v0=20,g=3`, landing is `40/3` s; a displayed label may round to 13.33 s, but End must calculate at the exact endpoint and show height 0.00 m. A seconds slider stepped by 0.01 can miss that endpoint. Change speed and gravity, then check the curve, point, axes and text together. Use Tab and arrow keys on each slider; check labels, units, focus and announced value text. Reload and check the defaults. The standalone reference code below is available for comparison, but passing it does not verify the generated app.

## 3. Save, share or hold the reviewed revision

Record the exact app revision and completed preview table before choosing an audience. Google says AI Studio apps are private by default and can be shared, but collaborators with access may view and fork code. A shared project does not make a deployed Cloud Run endpoint private. Verify access with the intended collaborators and keep confidential material out of this demo.

For an owner-approved Cloud Run publication, record the tier, service capacity, likely charges and intended public audience. Google documents **Publish → Get Started → Publish App** for eligible Starter Tier accounts; use the current controls and account readback for any standard deployment. Record the returned URL, service and revision. From another session, repeat the numerical, plot, keyboard and reload checks on that exact live URL, then inspect actual usage and billing. If a publish response is uncertain, inspect the app and Cloud Run service before retrying. If math, access, keyboard or cost checks fail, hold or restrict the release through the owner’s route, correct the exact source and run the cases again. The blank record below keeps pending fields visible.

The accompanying reference was checked locally with Node: syntax, pure-model arithmetic and simulated DOM events passed, including 920 supported speed/gravity pairs at five ticks each. These checks did not run a native browser, screen reader, AI Studio preview, provider account or deployment. The reader must test the generated preview and any live release. Google’s [Build](https://ai.google.dev/gemini-api/docs/aistudio-build-mode) and [deployment](https://ai.google.dev/gemini-api/docs/aistudio-deploying) documentation describe the route, not the correctness or cost of a particular generated app.

## Complete Build prompt and acceptance record

The text inside the following prompt block is ready to paste into Build. The table and blank release record are for the person reviewing the generated revision.

```text
Build a small, self-contained interactive educational web app titled “Vertical launch”. Its job is to show the height of one object launched straight upward from level ground under constant downward gravity. Use a React web frontend if that is the current default. It needs no runtime Gemini call, account sign-in, server data, database, map, live data, external plotting service, analytics, or API key. If Build generates a server or package dependencies, keep them unused for the model and disclose them for owner review. Do not add any network request for a slider movement.

Model, with SI units: initial upward speed v0 is 5–50 metres/second in steps of 1; gravity g is 1–20 metres/second squared in steps of 1. h(t)=max(0,v0*t−0.5*g*t*t). The apex is at t=v0/g and h=v0*v0/(2*g). First landing is t=2*v0/g. Velocity before contact is v0−g*t; at landing this is the instant before contact, not post-impact velocity. There is no bounce. The pure calculation function must reject nonfinite inputs, v0/g outside these bounds, negative t, and direct t greater than the current flight duration. UI state adjustment is separate: if v0 or g changes and the old selected t exceeds the new flight duration, clamp the UI time to exact landing BEFORE calling the pure function.

For the time slider use integer flight-position ticks 0–10000, step 1, and convert to seconds for the displayed value and model. Tick 0 means exact t=0; tick 5000 means exact t=v0/g; tick 10000 means exact t=2*v0/g, even for fractional seconds. For other ticks use flightDuration*(tick/10000). This is at most 0.01 second per keyboard arrow at the longest supported 100-second flight, and finer for shorter flights. Set an accessible value text in seconds whenever t changes. Home, midpoint and End must reach launch, apex and landing; the visual and text output must agree. When v0 or g changes, keep the previous selected seconds to the nearest representable tick, clamping to the new landing tick if necessary. Never rely on a seconds-based range max with fixed step 0.01: 40/3 seconds is not such a step.

Show three labeled keyboard-operable controls for v0, g, and t with their units, current numerical values, height, signed velocity, apex time/height and flight time. Provide a reset control that restores v0=20 m/s, g=10 m/s² and t=0. Draw a height-versus-time curve from launch through landing with labeled time and height axes and a point marking the selected t. The line and point must update on every slider change. Give a text summary of the current numbers so the chart is not the only way to read it. Use semantic labels and visible focus. Do not claim this is a real-world trajectory prediction: it omits air resistance, horizontal movement, variable gravity and collision. Keep the app client-side, deterministic and free of user-submitted records or secrets.

Before styling, expose the model calculation as a small pure function and make the following arithmetic checks pass. For v0=20, g=10: apex time 2 s, apex height 20 m, landing time 4 s, height at t=1 is 15 m, velocity at t=1 is +10 m/s, height at t=2 is 20 m and velocity at t=4 immediately before contact is −20 m/s. For v0=10, g=10: apex time 1 s, apex height 5 m and landing 2 s. At t=0 the height is zero and velocity equals v0. At landing the height is zero. For v0=20, g=3, flight time is exactly 40/3 s: End must select that exact model endpoint and display height 0.00 m, not 0.07 m at 13.33 s. A direct pure-function call with v0=20,g=10,t=5 must throw/reject. A legitimate UI change from v0=20,g=10,t=4 to v0=10,g=10 must instead clamp to exact new landing t=2 and show height 0. The control must be clamped when its flight duration shrinks; changing any control must change the curve/point/summary consistently. Use numeric tolerance 0.01 for displayed values, not string equality for internal arithmetic.

Give the owner the generated file list and identify any runtime calls, network destinations, packages and secrets. Do not assert that the app is verified merely because the preview renders. Do not publish it automatically.
```

## Reader acceptance record

Use these cases in the generated **preview and live release**. Write the observed values and app revision beside each; blank is untested. The complete reference artifact is `reference-simulator.html` in this public guide package. It can be saved as an HTML file and opened locally to inspect the intended interaction. The generated AI Studio app may be implemented differently, but its calculations and accessible controls must match.

| Input/action | Expected result | Observed/revision |
| --- | --- | --- |
| Reset: v0=20, g=10, t=0 | height 0 m; velocity +20 m/s; apex 2 s/20 m; landing 4 s |  |
| Move time to 1 s | height 15 m; velocity +10 m/s; point moves on curve |  |
| Move time to 2 s | height 20 m; velocity 0 m/s; point at apex |  |
| Move time to 4 s | height 0 m; velocity −20 m/s immediately before contact; point at landing |  |
| Set v0=10, g=10 | apex 1 s/5 m; landing 2 s; old time is clamped if above 2 s |  |
| Change g from 10 to 20 at v0=20 | apex 1 s/10 m; landing 2 s; axes, curve, point and summary all change |  |
| Set v0=20, g=3; use Home, choose tick 5000, then End on time slider | exact launch 0, apex 20/3 s, landing 40/3 s; End height 0.00 m; time label rounds to 13.33 s but endpoint calculation uses exact 40/3 |  |
| At v0=20, g=10 select End (t=4); change v0 to 10 | UI clamps to new exact landing t=2, height 0; no model exception |  |
| Directly call pure model(20,10,5) in a code test | rejects time after landing; UI clamp is a separate operation |  |
| Keyboard Tab and arrow keys on each slider | visible focus, announced label/value/units, values and plot update |  |
| Reload preview and live URL | default values return; no private data, login or unrelated network dependency |  |
| Live release from another browser/session | same arithmetic, public audience only as approved, recorded URL/tier/usage |  |

Record a release hold if the generated app disagrees with the formulas, if a slider updates text but not the plotted point, if the time control permits post-landing values, if keyboard use fails, or if generated code adds an unapproved network call or secret. Fix the exact code, inspect the changed revision, and rerun affected cases before sharing or publishing.

## Blank private release record

- Owner, account, intended audience and authorized use:
- Generated app/revision; saved source ZIP or owner-controlled repository revision:
- Code review: model function, dependencies, server routes, network calls, secrets and data path:
- Preview case table completed by, date and revision; failed/unrun cases:
- Sharing decision and exact named collaborators (or private):
- Cloud Run decision: no release / eligible Starter Tier / standard linked project with billing:
- Account readback for tier, Starter Tier capacity or standard project, quota, possible charges and owner approval:
- Published URL, service/revision and time, if actually published:
- Live case table results from another session; audience/access, keyboard and usage/billing readbacks:
- Final state: private / shared for review / released / held / unpublished; next owner action:

Do not put credentials, personal data or a private project token into a public copy of this record. Blank fields are pending, not passed checks.

## Complete standalone HTML reference

Save the code inside this block as reference-simulator.html for an independent, offline comparison. Check the AI Studio output separately.

```html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Vertical launch: checked reference simulation</title>
<style>
  body{font:16px/1.5 system-ui,sans-serif;max-width:58rem;margin:auto;padding:1rem;color:#17202a;background:#fff}
  .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));gap:1rem}
  label{display:block;font-weight:600} input[type=range]{width:100%}
  output{font-variant-numeric:tabular-nums} svg{display:block;width:100%;height:auto;border:1px solid #586777;background:#f7fafc}
  button{font:inherit;padding:.4rem .8rem} .note{background:#eef5fc;padding:.7rem}
  :focus-visible{outline:3px solid #145c9a;outline-offset:3px}
</style>
<h1>Vertical launch: a checked reference simulation</h1>
<p class="note">A simple mathematical model for learning, not a real-world trajectory predictor. One object launches straight up from level ground. Gravity is constant; air resistance, horizontal motion and bounce are omitted. No accounts, network calls or live data are used.</p>
<div class="grid">
  <div><label for="speed">Initial upward speed: <output id="speed-value">20 m/s</output></label><input id="speed" type="range" min="5" max="50" step="1" value="20"></div>
  <div><label for="gravity">Gravity: <output id="gravity-value">10 m/s²</output></label><input id="gravity" type="range" min="1" max="20" step="1" value="10"></div>
  <div><label for="time">Time after launch: <output id="time-value">0 s</output></label><input id="time" type="range" min="0" max="10000" step="1" value="0" aria-valuetext="0 seconds after launch"></div>
</div>
<p><button id="reset" type="button">Reset to worked example</button></p>
<p id="summary" role="status" aria-live="polite"></p>
<svg id="plot" viewBox="0 0 640 350" role="img" aria-labelledby="plot-title plot-desc">
  <title id="plot-title">Height over time</title><desc id="plot-desc">A height curve from launch to landing. A dot marks the selected time.</desc>
  <line x1="55" y1="310" x2="620" y2="310" stroke="#17202a" stroke-width="2"/>
  <line x1="55" y1="25" x2="55" y2="310" stroke="#17202a" stroke-width="2"/>
  <text x="300" y="340">Time (s)</text><text x="10" y="20">Height (m)</text>
  <path id="curve" fill="none" stroke="#145c9a" stroke-width="3"/>
  <circle id="point" r="6" fill="#bd4318"/>
  <text id="x-end" x="580" y="330"></text><text id="y-top" x="58" y="38"></text>
</svg>
<p>The formulas are <code>h(t) = v₀t − ½gt²</code> until landing, <code>velocity(t) = v₀ − gt</code>, apex time <code>v₀/g</code>, apex height <code>v₀²/(2g)</code>, and flight time <code>2v₀/g</code>. Input units are metres per second, metres per second squared and seconds. The time slider uses 10,000 equal flight-position ticks: Home is exact launch, the midpoint is exact apex, and End is exact first landing even when its time is fractional. Its finest seconds increment is 0.01 s at the longest supported 100 s flight. Changing speed or gravity preserves the selected time to the nearest tick, clamping it to a shorter flight. At landing, velocity means immediately before contact; post-contact motion is outside this model.</p>
<script>
  "use strict";
  function model(speed, gravity, time) {
    if (![speed, gravity, time].every(Number.isFinite) || speed < 5 || speed > 50 || gravity < 1 || gravity > 20 || time < 0) throw new RangeError("Invalid model input");
    const flight = 2 * speed / gravity;
    if (time > flight) throw new RangeError("Time is after first landing");
    const t = time;
    const apexTime = speed / gravity;
    const apexHeight = speed * speed / (2 * gravity);
    const height = Math.max(0, speed * t - 0.5 * gravity * t * t);
    const velocity = speed - gravity * t;
    return {flight, t, apexTime, apexHeight, height, velocity};
  }
  const speedInput = document.getElementById("speed");
  const gravityInput = document.getElementById("gravity");
  const timeInput = document.getElementById("time");
  const fmt = n => Number(n).toFixed(2);
  const ticks = 10000;
  let selectedTime = 0;
  function flightForControls() { return 2 * Number(speedInput.value) / Number(gravityInput.value); }
  function timeForTick(tick) {
    const speed = Number(speedInput.value), gravity = Number(gravityInput.value);
    if (tick === 0) return 0;
    if (tick === ticks / 2) return speed / gravity;
    if (tick === ticks) return 2 * speed / gravity;
    return (2 * speed / gravity) * (tick / ticks);
  }
  function setTimeFromPreviousSeconds() {
    const flight = flightForControls();
    const clamped = Math.min(Math.max(0, selectedTime), flight);
    const tick = Math.min(ticks, Math.max(0, Math.round(clamped / flight * ticks)));
    timeInput.value = String(tick);
    selectedTime = timeForTick(tick);
  }
  function draw() {
    const speed = Number(speedInput.value), gravity = Number(gravityInput.value);
    const r = model(speed, gravity, selectedTime);
    document.getElementById("speed-value").textContent = `${speed} m/s`;
    document.getElementById("gravity-value").textContent = `${gravity} m/s²`;
    document.getElementById("time-value").textContent = `${fmt(r.t)} s`;
    timeInput.setAttribute("aria-valuetext", `${fmt(r.t)} seconds after launch`);
    document.getElementById("summary").textContent = `At ${fmt(r.t)} s: height ${fmt(r.height)} m; upward velocity ${fmt(r.velocity)} m/s. Apex ${fmt(r.apexHeight)} m at ${fmt(r.apexTime)} s; landing at ${fmt(r.flight)} s.`;
    const xMax = Math.max(5, Math.ceil(r.flight / 5) * 5);
    const yMax = Math.max(10, Math.ceil(r.apexHeight / 10) * 10);
    const x = t => 55 + 565 * t / xMax;
    const y = h => 310 - 270 * h / yMax;
    const coords = [];
    for (let i = 0; i <= 100; i++) {
      const t = r.flight * i / 100;
      const h = Math.max(0, speed * t - 0.5 * gravity * t * t);
      coords.push(`${i ? "L" : "M"}${x(t).toFixed(2)},${y(h).toFixed(2)}`);
    }
    document.getElementById("curve").setAttribute("d", coords.join(" "));
    document.getElementById("point").setAttribute("cx", x(r.t));
    document.getElementById("point").setAttribute("cy", y(r.height));
    document.getElementById("x-end").textContent = fmt(xMax);
    document.getElementById("y-top").textContent = fmt(yMax);
    document.getElementById("plot-desc").textContent = `Height over time from launch to landing at ${fmt(r.flight)} seconds. Current point ${fmt(r.t)} seconds, ${fmt(r.height)} metres.`;
  }
  for (const input of [speedInput, gravityInput]) input.addEventListener("input", () => { setTimeFromPreviousSeconds(); draw(); });
  timeInput.addEventListener("input", () => { selectedTime = timeForTick(Number(timeInput.value)); draw(); });
  document.getElementById("reset").addEventListener("click", () => {
    speedInput.value = "20"; gravityInput.value = "10"; timeInput.value = "0"; selectedTime = 0; draw();
  });
  draw();
</script>
</html>
```

## Sources and further reading

- [Build apps in Google AI Studio](https://ai.google.dev/gemini-api/docs/aistudio-build-mode), Google, updated 20 October 2026. It documents Build, preview, Code, iteration, sharing and save routes. It does not validate this simulation.
- [Deploying from Google AI Studio](https://ai.google.dev/gemini-api/docs/aistudio-deploying), Google, updated 28 September 2026. It documents Starter Tier eligibility, standard billing and the Cloud Run publish route; check current account terms.
- [Build and release a Google AI Studio web app on Cloud Run](https://bigchange.ai/blog/google-ai-studio-build-cloud-run-web-app-guide), BIG CHANGE. This earlier guide covers general app release checks; the quantitative model and fixtures above address a distinct task.

## Sources

- [Build apps in Google AI Studio](https://ai.google.dev/gemini-api/docs/aistudio-build-mode) — Build generation, preview, code, sharing and saving.
- [Deploying from Google AI Studio](https://ai.google.dev/gemini-api/docs/aistudio-deploying) — Starter eligibility and limit, standard billing and Cloud Run release route.
