I’m trying to move the points shown in the images perpendicular to the line so that each point is consistently the same distance away from each one, rather than just move the points in the Z direction. How could I modify my definition to do this?

Also, how could I simplify the definition? - I have many lines, so the definition just repeats several times and I would like to simplify to eventually get to an easier iterative process.

Thanks!!