How can a parabola start at the origin, reach a given point and attain a specified height? This project turns that geometric question into a three-dimensional Python visualization.
Three inputs define the curve#
The inputs are horizontal endpoint coordinates x_f and y_f, together with a positive maximum height h_max. The version developed in the article uses a parameter t between zero and one:
x(t) = x_f · ty(t) = y_f · tz(t) = 4 · h_max · t · (1 − t)
Height is zero at both ends and reaches h_max halfway through the interval. The horizontal coordinates place the curve in the vertical plane passing through the origin and destination.
From coordinates to a plot#
NumPy samples the parameter and calculates three coordinate arrays. Matplotlib renders them on 3D axes so the view can be rotated and the effect of changing inputs inspected.
Using a parameter independent of the horizontal coordinates avoids invalidating the construction merely because one endpoint component is zero. If both horizontal components are zero, the curve degenerates into a vertical up-and-down path.
Geometry and scope#
The parameter does not represent seconds. The tool does not infer an initial velocity or include air resistance. It is a geometric construction exploring how starting point, destination and height constrain a curve. The article preserves the derivation and an input-validating implementation.