Extending a curve with 2d derivative

Is there any way to extend a curve while maintain the 1st derivative at the end and the 2d derivative the entire line?

In the attached I have a yellow line that I would like to extend. I would like it to reach the black line but I do not care where the intersection is. I would like to keep a smooth curve going. Thus, I would like to maintain the 1st derivative at what is now the end point but I would like the 2d derivative to be the same all the way to the intersection.

Which first and second derivative?

  • first and second derivatives of y with respect to z?

  • first and second derivatives of x,y,z with respect to distance along the curve?

  • first and second derivatives of x,y,z with respect to the parameter used by Rhino?

If we are extending in the X direction it would be the dx/dy and dx/dz and the similar 2d derivative.

The 2d derivative would be constant for the full extension of the curve.

For my purposes, it really does not have to be all that precise. Something about that would work. Whatever is easiest for Rhino.

What you want is a section of a parabola with the slope (first derivative) and second derivative defined at one end.

Disclaimer: I believe the technique below results in the desired curve, but I have not verified it.
Added: Verified that it “exactly” extends a parabola.

  1. Use Line with tangent option to create a short straight line from the end of the original curve.

  2. Rebuild the line as a degree 2 curve with 3 control points.

  3. Turn on the CurvatureGraph for the original curve and the new line. The graph for the new line will be not be visible since the line is straight and has zero curvature.

  4. Turn on the control points for the line (PointsOn) There should be three control points.

  5. Turn on Ortho

  6. Move the control point at the end opposite the original curve in the y direction only until the curvature of the new curve matches the curvature of the original curve. Important - move only the control point on the “free” end and move it only in the y direction (vertical on the screen). The resulting curve will match the original curve in position, slope and second derivative.

  7. If the control point could not be moved far enough to match curvature start over and create a shorter straight line.

  8. If a longer curve is needed use Extend with Natural or Smooth. Set a boundary object or a distance. Do NOT use dynamic extend (drag the end of the curve with the mouse).

  9. If you need a degree 3 curve use ChangeDegree with Deformable=No.