Create perpendicular object3D with a corresponding object3D

Hi everyone I’m just getting started in threejs but I love all the imaginable things you can do with it! However, Math and Linear Algebra is a weakness of mine and would like some insight on a project I’m doing.

I currently have lines (which is an object3D) generated in my scene (vertical, horizontal, and sloped) and would like to generate an object3D that is perpendicular for each line. I’m having to change the position, rotation everytime and was wondering if there was a better way of doing so?

Is it something to applying Matrix4 everytime? Not too sure on what approach to take next. thank you so much

A live example that shows what you have so far would be good. (e.g. jsfiddle, codepen)

Maybe these examples are a suggestion for you.

From the Collection of examples from

RotationAngle 1