Hello everyone,
is it possible to extract the focus, vertex and directrix of a given parabola in Rhino (or Grasshopper)?
It is reasonably simple to get them by drawing construction, provided the parabola has not been trimmed.

Set a construction plane to the parabola if it isnâ€™t parallel to one of the viewports.

Select the parabola so you can see the control points and draw a line between the tips. Draw a second line between the middle control point and the midpoint of the first line, giving the centreline of the parabola. the centreline cuts the parabola at the vertex.

Make a couple of copies of the centreline spaced out across the parabola.

Draw tangents to the parabola where the new lines intersect it.

Mirror the two lines in their associated tangents. The new lines will cross the centreline at the focus.

Now you have the vertex and focus, draw a circle around the vertex and through the focus.

Finish by drawing the directrix as a line tangential to the other side of the circle.
HTH
Jeremy
Thatâ€™s more than I expected! Thanks a lot for the clear explanation!
It would be useful to extract them with a single click though, maybe I might suggest this in the â€śrequested fetures sectionâ€ť.
Thanks again!
MarkFoci
may help.
Pascal
That isnâ€™t possible since the object is just shaped like a parabola.
It is defined in Rhino as a NURBS curve.
The NURBS definition of the curve does not have the information youâ€™re looking for.
It would have to be calculated or found using Jeremyâ€™s excellent description.
It might be possible for someone with scripting skills to automate the process to provide those points, but they are not there in the Rhino NURBS definiton of the curve.
That looks like a great shortcut, especially as it seems to work on a trimmed parabola too.
Regards
Jeremy
Right, it is true that the nurbs has not the equation of the parabola but it is also true that a 2 degree curve made with 3 points itâ€™s exactly a simmetricai prabola, am I wrong? So it shouldnâ€™t be impossible to retrieve those points automatically, it should only be a matter of recognizing the parabola equation starting from the nurbs equation, but I agree that it wouldnâ€™t be a ever working solution since that it wouldnâ€™t work with trimmed parabolas.
Thanks again for the clear answers!
Great! From the foci I can extract the rest, and it works on trimmed parabolas too, great thatâ€™s what I was looking for, thanks!
'Fraid so. My memory is rusty but I think you also have to specify the weights of the control points are all one (otherwise you could have, say, an arc or a hyperbola). However whilst that gives a parabola, it isnâ€™t necessarily symmetric. For symmetry you then also have to specify that the end control points are equidistant from the middle one.
Regards
Jeremy