How to get the vertices of a polygon described by planes

This is an answer to a question that has remained unanswered.

Basically, I am trying to simulate a card that has the following format:

Each brush defines a solid area. Brushes define this area as the intersection of four or more planes. Each plane is defined by three non-colonial points. These points should go clockwise:

1-2 ----------------->
|
3
|
|
|
|
|
,

Each brush instruction is as follows:

 {
  (128 0 0) (128 1 0) (128 0 1) // plane 1
  (256 0 0) (256 0 1) (256 1 0) // plane 2
  (0 128 0) (0 128 1) (1 128 0) // plane 3
  (0 384 0) (1 384 0) (0 384 1) // plane 4
  (0 0 64) (1 0 64) (0 1 64) // plane 5
  (0 0 128) (0 1 128) (1 0 128) // plane 6
 }

, , , . , (128,128,64) (256,384,128). :

  ( 128 0 0 ) ( 128 1 0 ) ( 128 0 1 ) 
   1st Point   2nd Point   3rd Point 

, , 2d- 3d-. , :

beginShape();
vertex(x0,y0,z0);
vertex(x1,y1,z1);
vertex(x2,y2,z2);
vertex(x0,y0,z0);
endShape();

, ?

+3
1

, : , , , - , .

:

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

, convex , 3d , .

+4

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


All Articles