Prisms and Antiprisms

  • Email
  • Sharebar
  • Email
dpietrobon's picture

A prism is a 3D shape with two matching polygonal faces connected by straight edges.

To create these objects in the virtual world we can reuse our code for making polygons and simply connect the edges.

An antiprism is like a prism, but its top and bottom faces are rotated and connected with triangles.

 
The following logo procedure defines antiprisms centered at the origin:
 
 
Interestingly, the triangular faces of an antiprism form a shape known as a skew regular polygon. That is a polygon which is regular, but not confined to 2-dimensional space alone.
 

Comments

Andy's picture

Prism and Antiprism

Nice blog on prism and antiprism.  Many would not know about "antiprism", which is unfortunately not as famous as antipasta :-p

We often describe that prism is two parallel congrent bases connected by a ring of rectanglesAntiprism is the two bases are twisted so the two bases are connected by a ring of alternating triangles

By the way, there is a typo in line 13 of the antiprism procedure:

  1. MAKE "diag SQRT ( :h ^ 2 + ( :x2 - x1 ) ^ 2 + ( :z2 - :z1 ) ^ 2 ) ; Triangle side length
 
where the x1 should be :x1. At the end of line 16, there could have PU to mark the end for the PD at the end of line 5.
 
Thanks for sharing your maths artefacts. I liked that the prism and antiprism created have the turtle's location as the center, and the good use of LOOKATXYZ to orient the turtle heading.  smiley yes