27.06.2013 Views

learning - Academic Conferences Limited

learning - Academic Conferences Limited

learning - Academic Conferences Limited

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Robert Lucas<br />

origin at the centre of the cube, we can imagine the points of intersection of this plane with each<br />

affected triangle.<br />

Figure 3: Visualizing the cut points of a plane with a cube<br />

This gives us the necessary insight to define a cut-point as consisting of two vertices and a number<br />

representing how far from the first vertex toward the second is this cut-point. Thus a single cut point is<br />

represented by the triple:<br />

(VertexA, VertexB, lambda)<br />

Where the cut occurs on this edge between VertexA and VertexB at the point<br />

(VectorB-VectorA)* lambda<br />

Where VectorA is the vector from the origin to VertexA and VectorB is the vector from the origin to<br />

VertexB.<br />

Thus the entire planar cut can then be represented by the ordered list:<br />

{CutA, CutB,…,CutH}<br />

It is clearly the case that this representation can be used on any arbitrary complicated mesh, just as<br />

long as the mesh is composed of triangles. More importantly, we can now perceive how a cutting<br />

algorithm might proceed by taking each cut point and creating a vertex at the point of the cut and<br />

rebuilding each triangle that has a vertex on the edge containing the cut point. Finally we will need to<br />

fill in the missing faces that the cut has created. In pseudo code (Lucas 2000) the algorithm is:<br />

Begin<br />

CutPoint1 = Cut[0]<br />

VertexA = CreateVertex(CutPoint1)<br />

For each remaining cut point do<br />

CutPoint2 = Cuts[next];<br />

VertexB = CreateVertex(CutPoint[next])<br />

If both cut points share same first vertex then<br />

CreateTriangle(VertexA, VertexB, SharedVertex)<br />

Else<br />

CreateTriangle(VertexA, VertexB, CutPoint1.StartVertex)<br />

CreateTriangle(VertexA, CutPoint2.StartVertex, CutPoint1.StartVertex)<br />

Endif<br />

VertexA = VertexB<br />

Repeat<br />

End<br />

437

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!