I have a linear spline in the shape of a triangle.

Now I want to change the interpolation of one of the points from hard to soft.

How can I calculate the "soft interpolation" tangent of that point?

**Note:** I do not want to use the c4d "Soft Interpolation" command.

I want to calculate the tangent in that point myself.

-Pim

]]>Thanks Martin.

Indeed it gives me more functionality.

-Pim

]]>Hi Pim,

I had this one in my script collection,

if you want to calc it by your own to have more flexibility:

```
#_______________________________________________________
#Soft interpolation
lenRight = (pointList[i+1] - pointList[i]).GetLength()
lenLeft = (pointList[i-1] - pointList[i]).GetLength()
lenAverage = (lenLeft + lenRight)/2
if lenAverage > lenRight:
lenAverage = lenRight
elif lenAverage > lenLeft:
lenAverage = lenLeft
orientation = (pointList[i+1] - pointList[i-1]).GetNormalized()
tangent = orientation * lenAverage / 4
spline.SetTangent(i, -tangent, tangent)
```

Best wishes

Martin

Hi Pim,

Thanks for letting me know, I'll close the topic as solved. I had to truncate the name to fit in the solved tag.

Joey Gaspe

SDK Support Engineer

Thanks, SplineHelp will do.

-Pim

]]>Hi pgroof,

Could it be that SplineHelp.GetTangent(), which is the closest I could find when searching the help, is what you need?

Otherwise, if the commands and methods supplied by Cinema 4D are not sufficient for your needs, you'll have to figure out the mathematical formulas yourself.

Joey Gaspe

SDK Support Engineer