How to create perfectly parallel offset splines?

I am trying to create a spline with parallel points and tangents.

I managed to make the points parallel, but I don’t know how to adjust the tangent scale, so the curves are not parallel. I’ve also tried scaling based on curvature, but the results are unsatisfactory.

Is there anyone who is good at solving problems like this?

Get all points and tangents. Add an offset vector to foreach points and set on other spline?

PS: If you are trying to do a parallel just preserving the tangent and copy everything will work and it would be parallel. If you are trying to do with an offset like (the total length changing) a road’s sidewalk then you have to get normal of tangent, dot product to right vector, then add offset vector to the original vector and set spline points on the new target for each point. Again setting custom splines tangent should work.