Polygonal Math

Given the list of points that make up a simple 2d polygon oriented in 3d space and the normal for that polygon, what is a good way to determine which points are specific β€œcorner” points?

For example, which item is in the lower left corner, or in the lower right corner, or at the top point? The polygon can be oriented in any 3d orientation, so I'm sure that I need to do something with the normal one, but I have problems with the correct math.

Thanks!

+3
source share
8 answers

Are you looking for a bounding box?

I'm not sure that normal has anything to do with what you ask.

Bounding, 4 : MinX, MaxX, MinY, MaxY

, X MaxX MinX Y MaxY MinY, .

, MinX, MinY , MinX, MaxY ..

:

, "" . , .

2D- ( ), , .

+1

, . () , " " " " .

(, ) , .

  • - 3D-, ?

  • , ?

+2

  • , , - , .

  • , , XY (.. , Z)

  • , ( 2D-, )

  • , 2, 3D-.

+1

, , , " " " ".

, , , , , "". ( "" ) .

3D- , "", "" "" . , "" .

+1

.

0

, , , :

  • / 2- . / , . , " " X, Y, Z " " X, Y, Z.
  • min/max ( "" ) " " . , ( - , ).
  • "2d " " "; , "" "".

, , , , , . , , min/max x/y/z .

0

, - , , . , (.. ), " ". , , .. - , , , ( ), . , , , " " , "" COM ( ). "" , , , . , . - ( , ), . .

0

, 3D "", , 3D- 2D- ( , ) - ( ) ( , ) - . Y 3D- , "", , Y ( Z- "" ).

The math is pretty simple (you can use the internal product (aka scalar product) to project onto your plane and some matrix material to convert to a 2D coordinate system - you can get all this by searching for raytracer algorithms for polygons.

0
source

Source: https://habr.com/ru/post/1706487/


All Articles