Skip to content

Commit e8cafc5

Browse files
committed
animation v0
1 parent af1db0e commit e8cafc5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/src/tutorial-continuation.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,15 @@ html_anim = """
310310
const animation_duration = 10.0;
311311
312312
const zone_width = canvas.width / 3;
313-
const baseline = canvas.height - 60;
313+
const top_margin = 50; // Space for time label at top
314+
const bottom_margin = 120; // Space for ground line + v gauge + Tmax label
315+
const baseline = canvas.height - bottom_margin;
314316
315317
// Scale for altitude (r goes from r0 to ~r0+0.1)
316318
const r_min = r0;
317319
const r_max_all = Math.max(...r1, ...r2, ...r3);
318320
const r_range = r_max_all - r_min;
319-
const altitude_scale = (canvas.height - 120) / r_range;
321+
const altitude_scale = (baseline - top_margin) / r_range;
320322
321323
// Scale for velocity (v goes from 0 to ~0.1)
322324
const v_max_all = Math.max(...v1, ...v2, ...v3);

0 commit comments

Comments
 (0)