D
D
Daniel2020-04-18 17:10:17
3D
Daniel, 2020-04-18 17:10:17

How to determine the visible edges of a polygon to points on a plane?

How to determine the visible edges of a rectangle on a plane relative to a point?
That is, there is a way to find the angle between the normal vector and the projection vector. If it is blunt, then the rib is visible.
The question is how to find the normal vector, namely in which direction it is rotated.
I've already read 100,000 articles and 2 textbooks, and I still don't understand how all the normals will be directed outward when walking around the polygon, That is, how to determine n (x, y) and n (-x, -y)?
For example, the equation of a straight line through 2 points A(1,1) and B(2,2) will be AB: (X-2)/(2-1)=(Y-2)/(2-1) ->
X- 2=Y-2 and depending on which direction I will move the right and left expression to get ur. direct Ax+By+D=0 (i.e. XY=0 or -X+Y=0) I will have 2 different collinear normal vectors (1,-1) or (-1,1).
And no matter how I twist, my normal vectors will always be directed in one direction, that the near side, that the far side.

5e9b0a3f833ba064880099.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2020-04-18
@pav5000

A polygon is a set of vertices given in a specific order. Here also define normals proceeding from this order. For example, set your standard to walk the polygon always clockwise, then the face normal will always be 90 degrees to the left of the vector drawn from vertex n to vertex n+1.
In 2D engines, they usually do this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question