How to draw a line perpendicular to another line (3D object) in 3D space according to it's local axis in three.js?

Viewed 175

I am new to webgl graphics, I am looking for a way in three.js to draw a line which is perpendicular to another line(already exisiting line in 3D space) with respect to line's local axis (draw line to first line's z- local axis for example). draw line to another line's local axis

1 Answers

You say the line has a "local axis"

Note that the local X or Y axis of the line is indeed exactly what you are asking for.

The local X or Y axis of a line is indeed a line perpendicular to the line.

The local z axis of a line is simply the line itself. Local X and Y are perpendicular.


Are you aware that, for a given line L, you are asking for a "perpendicular line". There is an infinite number of lines perpendicular to L, in fact what you are describing is a plane (perhaps think of it as a disk); L goes through the "middle of" the disk at right angles.

Related