Hi I have abunch of planes that are currently laying flat on the xy-plane

the planes have different rotations as you can see here

-> I am aware that some of the planes are to steep for this to work properly but I already have a solution for this

so what i basicly want to do is this :

-> the red are planes at current position (simpified)

and i want to find out how far i have to move them on the z axis for them to create a surface where the planes are the tangent line on that point of the curve

if anybody has an idea I would greatly appriciate the help

thanks