dilevin / computer-graphics-meshes

Computer Graphics Assignment about Meshes
1 stars 6 forks source link

cube.cpp + NV #45

Open SCOU7 opened 1 year ago

SCOU7 commented 1 year ago

If NV has the 6 normal vectors (which I assume is the 3 unit normal vectors and their opposite vectors), For each 8 vertex of the 3D cube, how am I supposed to find a corresponding normal in NV? I think this is what I need to do for NF.

Zhecheng-Wang commented 1 year ago

NV is 6x3 because a cube has 6 faces, and the normal vector is 3D. In the same sense, NF is 6x4 because every face has 4 vertices, and NF maps every face vertex to a row in NV.

SCOU7 commented 1 year ago

Let's say face A (0th face) has four vertices p0, p1, p2, and p3. Call A's normal vector n. I need to assign n to each of p0, p1, p2, and p3. Am I right?

Zhecheng-Wang commented 1 year ago

Yes, exactly. This assignment can be done through NF.

SCOU7 commented 1 year ago

Thank you so much!