learning - Academic Conferences Limited
learning - Academic Conferences Limited learning - Academic Conferences Limited
Robert Lucas Occasionally we will also refer to 2 vectors that are used to map textures onto surfaces. In both cases vectors are represented by a bold letter, such as V1 in any formula or sentence. 3. Basic data structures In the Unity (Unity 2011) world a mesh consists of an array of triangles. This is a list of indices into another array of vertices where each vertex is a 3-vector. This defines the position of the vertex in 3D space. Each consecutive three entries of the triangles array define a triangle. To make this tangible figure 2 shows how a cube is represented by twelve triangles where each triangle consists of three vertices. The ‘triangles’ array that corresponds to this contains: 3, 1, 2, 2, 1, 0, 5, 3, 4, 4, 3, 2, 7, 5, 6, 6, 5, 4, 1, 7, 0, 0, 7, 6, 5, 7, 3, 3, 7, 1, 2, 0, 4, 4, 0, 6. In fact, it is not quite as simple as this as there is a good deal of redundancy in the vertices array with the same point being represented as many times as it appears in the definition of a triangle. The very first operation applied in our cutting process is to remove this redundancy to make the triangles array as defined above. This makes it very much easier to compare vertices as the vertex number in the triangles array uniquely defines a point in space. Thus if two entries in the triangles array are the same, then they must refer to the same point in 3D space. Figure 2: The vertices of a cube drawn as a mesh of triangles 4. Developing a cutting algorithm Developing software for complex operations can sometimes be rather akin to the old joke: when you ask an Irishman the way, he replies ‘Well I wouldn’t want to start from here’. This is because the space the problem spans can just be too large to get to grips with. However much we like to pretend in the software world that all things can be achieved by a top-down design approach (Lucas 2000), in practice we commonly use a combination of top-down and bottom up design approaches, if for no other reason than it can prevent us going insane from the complexity of what we are trying to deal with. The bottom-up approach does allow us to start from ‘somewhere else’ which will indeed make it easier to get to our destination. 4.1 Representing a planar cut as a data structure In this case it seems sensible to start with a definition of a cut as a data structure that will give us a handle on actually performing the cut. Then we can address the issue of how we might create such a cut data structure at a later time when we are entirely happy that our representation has made the problem tractable. This concentrates the mind wonderfully, what do we mean by a cut? What do we want to be the result of the cut? These questions come to mind as soon as we address the problem of representing the cut. For simplicity we will consider planar cuts. Elementary geometry tells us that a plane can be represented by a normal to the plane and a single point on the plane, so there is certainly no problem in representing that; two 3-vectors will suffice. If we look at Figure 3 and imagine a planar cut caused by a blade occupying a plane containing the x and y axes passing through the 436
Robert Lucas origin at the centre of the cube, we can imagine the points of intersection of this plane with each affected triangle. Figure 3: Visualizing the cut points of a plane with a cube This gives us the necessary insight to define a cut-point as consisting of two vertices and a number representing how far from the first vertex toward the second is this cut-point. Thus a single cut point is represented by the triple: (VertexA, VertexB, lambda) Where the cut occurs on this edge between VertexA and VertexB at the point (VectorB-VectorA)* lambda Where VectorA is the vector from the origin to VertexA and VectorB is the vector from the origin to VertexB. Thus the entire planar cut can then be represented by the ordered list: {CutA, CutB,…,CutH} It is clearly the case that this representation can be used on any arbitrary complicated mesh, just as long as the mesh is composed of triangles. More importantly, we can now perceive how a cutting algorithm might proceed by taking each cut point and creating a vertex at the point of the cut and rebuilding each triangle that has a vertex on the edge containing the cut point. Finally we will need to fill in the missing faces that the cut has created. In pseudo code (Lucas 2000) the algorithm is: Begin CutPoint1 = Cut[0] VertexA = CreateVertex(CutPoint1) For each remaining cut point do CutPoint2 = Cuts[next]; VertexB = CreateVertex(CutPoint[next]) If both cut points share same first vertex then CreateTriangle(VertexA, VertexB, SharedVertex) Else CreateTriangle(VertexA, VertexB, CutPoint1.StartVertex) CreateTriangle(VertexA, CutPoint2.StartVertex, CutPoint1.StartVertex) Endif VertexA = VertexB Repeat End 437
- Page 412 and 413: Eugenijus Kurilovas et al. Then hie
- Page 414 and 415: Eugenijus Kurilovas et al. If we lo
- Page 416 and 417: Models of eLearning: The Developmen
- Page 418 and 419: Stella Lee et al. Converging (AC a
- Page 420 and 421: Stella Lee et al. knowledge. Meta k
- Page 422 and 423: Stella Lee et al. Figure 3: Home pa
- Page 424 and 425: Stella Lee et al. Azevedo, R., Crom
- Page 426 and 427: Jake Leith et al. opportunities ble
- Page 428 and 429: Jake Leith et al. Data was collecte
- Page 430 and 431: Jake Leith et al. their informal sk
- Page 432 and 433: Jake Leith et al. For the summative
- Page 434 and 435: Sophisticated Usability Evaluation
- Page 436 and 437: Stephanie Linek and Klaus Tochterma
- Page 438 and 439: Stephanie Linek and Klaus Tochterma
- Page 440 and 441: Stephanie Linek and Klaus Tochterma
- Page 442 and 443: Social Networks, eLearning and Inte
- Page 444 and 445: Birgy Lorenz et al. 135 students p
- Page 446 and 447: Birgy Lorenz et al. The experts' st
- Page 448 and 449: Birgy Lorenz et al. Akdeniz, Y. (19
- Page 450 and 451: Arno Louw programmes, and within th
- Page 452 and 453: Arno Louw It should be clearly stat
- Page 454 and 455: Arno Louw somewhat an unwritten con
- Page 456 and 457: Arno Louw Lecturers assume that le
- Page 458 and 459: A treasure hunt has to be done to f
- Page 460 and 461: How to Represent a Frog That can be
- Page 464 and 465: Robert Lucas Note the need to creat
- Page 466 and 467: Robert Lucas Figure 5: A model of a
- Page 468 and 469: Learning by Wandering: Towards a Fr
- Page 470 and 471: Marie Martin and Michaela Noakes wa
- Page 472 and 473: Marie Martin and Michaela Noakes Th
- Page 474 and 475: Marie Martin and Michaela Noakes is
- Page 476 and 477: Linda Martin et al. across the sect
- Page 478 and 479: Linda Martin et al. confidence. Alt
- Page 480 and 481: 8. Conclusion Linda Martin et al. T
- Page 482 and 483: Personalized e-Feedback and ICT Mar
- Page 484 and 485: Maria-Jesus Martinez-Argüelles et
- Page 486 and 487: Source: Own elaboration from survey
- Page 488 and 489: Maria-Jesus Martinez-Argüelles et
- Page 490 and 491: Maria-Jesus Martinez-Argüelles et
- Page 492 and 493: 1.1 Semantic dimension Maria-Jesús
- Page 494 and 495: 2. Methodology Maria-Jesús Martín
- Page 496 and 497: Maria-Jesús Martínez-Argüelles e
- Page 498 and 499: Maria-Jesús Martínez-Argüelles e
- Page 500 and 501: David Mathew members of staff frigh
- Page 502 and 503: David Mathew disclose this informat
- Page 504 and 505: David Mathew baboon smells the wate
- Page 506 and 507: Peter Mikulecky framing learning, p
- Page 508 and 509: Peter Mikulecky inhabitants or work
- Page 510 and 511: Acknowledgements Peter Mikulecky Th
Robert Lucas<br />
Occasionally we will also refer to 2 vectors that are used to map textures onto surfaces. In both cases<br />
vectors are represented by a bold letter, such as V1 in any formula or sentence.<br />
3. Basic data structures<br />
In the Unity (Unity 2011) world a mesh consists of an array of triangles. This is a list of indices into<br />
another array of vertices where each vertex is a 3-vector. This defines the position of the vertex in 3D<br />
space. Each consecutive three entries of the triangles array define a triangle. To make this tangible<br />
figure 2 shows how a cube is represented by twelve triangles where each triangle consists of three<br />
vertices. The ‘triangles’ array that corresponds to this contains: 3, 1, 2, 2, 1, 0, 5, 3, 4, 4, 3, 2, 7, 5, 6,<br />
6, 5, 4, 1, 7, 0, 0, 7, 6, 5, 7, 3, 3, 7, 1, 2, 0, 4, 4, 0, 6. In fact, it is not quite as simple as this as there is<br />
a good deal of redundancy in the vertices array with the same point being represented as many times<br />
as it appears in the definition of a triangle. The very first operation applied in our cutting process is to<br />
remove this redundancy to make the triangles array as defined above. This makes it very much easier<br />
to compare vertices as the vertex number in the triangles array uniquely defines a point in space.<br />
Thus if two entries in the triangles array are the same, then they must refer to the same point in 3D<br />
space.<br />
Figure 2: The vertices of a cube drawn as a mesh of triangles<br />
4. Developing a cutting algorithm<br />
Developing software for complex operations can sometimes be rather akin to the old joke: when you<br />
ask an Irishman the way, he replies ‘Well I wouldn’t want to start from here’. This is because the<br />
space the problem spans can just be too large to get to grips with. However much we like to pretend<br />
in the software world that all things can be achieved by a top-down design approach (Lucas 2000), in<br />
practice we commonly use a combination of top-down and bottom up design approaches, if for no<br />
other reason than it can prevent us going insane from the complexity of what we are trying to deal<br />
with. The bottom-up approach does allow us to start from ‘somewhere else’ which will indeed make it<br />
easier to get to our destination.<br />
4.1 Representing a planar cut as a data structure<br />
In this case it seems sensible to start with a definition of a cut as a data structure that will give us a<br />
handle on actually performing the cut. Then we can address the issue of how we might create such a<br />
cut data structure at a later time when we are entirely happy that our representation has made the<br />
problem tractable. This concentrates the mind wonderfully, what do we mean by a cut? What do we<br />
want to be the result of the cut? These questions come to mind as soon as we address the problem of<br />
representing the cut. For simplicity we will consider planar cuts. Elementary geometry tells us that a<br />
plane can be represented by a normal to the plane and a single point on the plane, so there is<br />
certainly no problem in representing that; two 3-vectors will suffice. If we look at Figure 3 and imagine<br />
a planar cut caused by a blade occupying a plane containing the x and y axes passing through the<br />
436