Hello and thanks for helping. I am exploring orbital equations given position, velocity, mass, and gravitational constant ($r, v, G, M$). There likely are answers somewhere here that explain these equations, but I have implemented them in Desmos. I would appreciate if someone took a look at my equations and told me where I am wrong. The reason why I think I am wrong is because the path of the orbit does not intersect with the initial position (which, of course, should lie on the orbital path).
Here are the equations:
$$ h = r \times v $$ $$ E=0.5\cdot|v|^2-\frac{GM}{|r|} $$ $$ a=-\frac{GM}{2E} $$ $$ e=\sqrt{1+ \frac{2Eh^2}{G^2M^2} } $$ $$ b=a\cdot\sqrt{1-e^2} $$
where h is angular momentum, E is specific mechanical energy, a is the semi-major axis, e is eccentricity, and b is the semi-minor axis. I then drew the ellipse with the following equation:
$$ \frac{x^2}{a^2}+\frac{y^2}{b^2}=1 $$
My Desmos implementation can be found here: https://www.desmos.com/calculator/kcc3afkuj0