Not a direct fix, but I would use This Plugin when I want to make complicated shapes for paths like in the second example. You’d get a shape on which you can build the railway yourself. There might be a plugin that specializes in this, but I’m not sure
In the other two, have a segment of track already made and then use Ropeater (Bless stravant)
just create bezier curves with them get the average position and set that as an anchor point then with that split it up into even pieces and cframe them, where the lookat matrix is facing the next point, if it is the last then it is facing the previous lookat matrix. then the scale for each is equivalent to the distance between the two nodes
look all you are doing is you have this graph right, thats the line segments and their domain is from PartA to PartB. Look at this from a top down 2d perspective. Generate the graph with a bezier curve, hermite splines, whatever you choose you will basically get the x depth of partA and the x depth of partB, for loop that for each stud, then for each stud calculate the output aka y value (in this coordinate system, z) of the node. put your nodes in a table, this table will grow exponentially based on your resolution/how many times you wanna loop through. then go through each node and scale it and make the pieces look at the next node correspondingly