Write a program or function that will determine if a point in 3D space lies on a 2D parabolic curve.
3 points in 3D space
vertex of a 2D parabolic curve
arbitrary point on the curve
arbitrary point in space
Input may be taken in any form (string, array, etc.) provided no other data is passed.
You may assume
the axis of a parabola will be parallel to the z axis
the vertex of a parabola has the maximal z value
parabolae will never degenerate
point values will be whole numbers that are
A truthy/falsey value representing whether the third point given lies on the parabolic curve of the first two points.
(2, 1, 3) (1, 0, 1) (4, 3, -5)
(16, 7, -4) (-5, 1, -7) (20, 6, -4)
Walkthrough (Example #1)
Find a third point on the curve. To do this, mirror the arbitrary point (on the curve) over the vertex. Here is a visual (each blue line is √6 units):
Find the parabolic curve between the three. This is easiest on a 2D plane. Here is the 3D graph, translated to a 2D graph (each blue line is √6 units):
Graph the third given point and solve.