I'm using the code of this answer to find the screen position of 3d objects in three.js:
Converting 3D position to 2d screen position [r69!]
I'm drawing a 2d line from the position of 3d object in the scene to a 2d point on the screen. some times the 3d object is outside the viewport. in that case i would like to draw a line from the 2d point on the screen to the edge towards the un-seen object, but i want it to be accurate in the right angle and to the right position.
anybody has any suggestions?