# Find the tangent point automatically

I have a sin curve, I chose the center of this sin curve, the other curve is a parabola, I am able to displace the second curve on the tangent point by hand with the Sample Curve Factor.

I would like to know if there is a way to do it automatically, as I change the amplitude or frequency of the sin curve?

Edit: I would like to use only Translate on the parabola, and the reference point is the one chosen at the end of the sin Curve called : "Sin Center". Thank you for your help.

• mainly this is more a mathematical problem than a geometry nodes problem. Unfortunately you didn't tell us all important informations to solve it because there are many ways to meet two points of two different functions. You can rotate, scale and move them. And i am pretty sure you don't want to rotate them. But you didn't tell us, whether the sin or the parabol should move to get a common point (or both) and should be the common point always at 0,0? Dec 25, 2022 at 7:13
• @ Chris: You are right this is certainly more a mathematical problem than a geometry node one. It's true i don't want rotate or scale the parabola just translate it. The point of reference can should be chose by the Sample Curve Factor at the end of the sin curve. Thank you for your comment. Dec 25, 2022 at 7:31
• True, it's really a maths problem, not a Blender problem.. but since it's a quick one... Dec 25, 2022 at 9:16

By the chain rule, it turns out that, (simplified by $$cos0=1$$), the derivative of $$a\times sin(f\times x)$$ at $$0$$ is $$a\times f$$

The derivative of $$x^2$$ is $$2x$$

So we have to find the point on the parabola such that $$2x=a\times f$$.

Calculate $$(x=\frac {a\times f}{2},$$ and $$y={whateverthatis^2})$$ and offset the parabola by that:

.. with this sort of result:

• Thanks Robin Betts, It's a very efficient mathematical approach. I just find a more GN one. I'll post it in a few minutes. Dec 25, 2022 at 10:00
• Thanks, @Kuboå, & Nathan .. Mathjax was never my thing.... I must start learning it :) Dec 25, 2022 at 20:10
• @RobinBetts Like RegEx, for me at least, it's one of those things you never really remember but copy from a cheat sheet whenever it comes up every other month or so :) I usually look here: jojozhuang.github.io/tutorial/… Dec 25, 2022 at 20:27

I am agree that question could appear as pure math one but there is GN solution:

Edit:

So this approach is more physical than mathematical.

At first you must find the location of the point of touch on the sin curve. A Sample Curve and a Compare node will give you the index of this point. This Sample Curve will give the Position of all the points you just have to select the right one with a Attribute Statistic within the right selection (the output of the Compare node). With another Attribute Statistic you extract the Tangent at this point.

Now its time for the other curve. With a Sample Curve and Compare node you will select the index of the point witch have the same tangent as the other point on the other curve. An Attribute Statistic will give the position of this point. Then you just have to subtract this value of a Position node and plug the out put in the Position input of a Set Position that will displace the curve in the way that this point is now the “origin” of the curve, then in the Offset input used the Set Position extracted from the first Attribute Statistic node will displace it accordingly to the point you choose on the first curve.

\Edit:

The advantage of this method is that it will work for more than one type of curve (not everyone). But you will have to have a curve with a lot of point if not that jump. For this specific question I do prefer the cleaner and simpler mathematical one. Thanks Robin Betts.

• I very much like that search-by-selection thing.. I'd never thought of that! And you're right, in principle, it would cope with any curve/surface.. Nothing wrong with numerical methods when they are reasonably efficient and the accuracy is as high as the resolution of your domain. I think maybe you should give yourself your tick :D Dec 25, 2022 at 10:59