 # Dependency Curve curvature to control point position

Hi,

I was wondering if there is an way to calculate the position of a curve’s control point when wanting the curve curvature have a specific value at a specific position.

I m writing a custom blend curve component, by which the continuity blend/supports can be set by the user as by the default GH blend curve component: 0:Position, 1:Tangency, 2:Curvature.
In the case the user choose 2, I get to find the position of the 3d CP (first and second are set), so that the curvature of the blend at its extremity the same is, as the one from support. I guess they are an infinity of solutions, and I am wondering if there is a mathematic formula that gathers the cp coordinates and the goal curvature @parameter p.

In my case the distance between CP2 (tangency) and CP3 (curvature) is set to. So the 3d CP lies on a sphere centered on CP2. An idea would be to iterate over that sphere and minimise the distance between isCurvature and mustCurvature, but if a less computation time demanding approach exists, it would be quite interesting.
Thank you!

Pierre

Found here the answer to my question:

respectively in the matchCurve Component from Tom, which is available on Git. Thank you Tom.