I hope someone can shed light on this issue for me. If I'm given a point (i, j, k), I can make the following cube:
8______K_______7 1 = i , j , k /| /| 2 = i+1, j , k L/ | J/ | 3 = i+1, j+1, k / |H / | 4 = i , j+1, k 5/______I_____/6 |G 5 = i , j , k+1 | | | | 6 = i+1, j , k+1 | | | | 7 = i+1, j+1, k+1 E| 4|________|F__|3 8 = i , j+1, k+1 | / c | / | /D | /B |/___________|/ 1 A 2
where the numbers 1-8 are each of the vertices of the cube, and the letters AL are the midpoints of each edge of the cube.
I am trying to implement a marching cube algorithm, but I donβt know what order to give points for each triangular plane that I find. For example, if vertex 1 is marked, I will need to draw a plane from EDA. Similarly, if vertex 7 is marked, I will need to draw a plane from KJG. Is there a rule so that the order gives the coordinates in the 3D space for openGL?
source share