Function Repository Resource:

Triangle3DTo2D

Given a 3D triangle, return an equivalent 2D triangle along with a transformation function

Contributed by: Ed Pegg Jr
 Triangle3Dto2D[triangle] computes a two-dimensional triangle along with a rotation matrix and offset vector so that one can recover triangle given in three-dimensional space. Triangle3Dto2D[triangle,"TransformationFunction"] computes a two-dimensional triangle along with a TransformationFunction so that one can recover triangle given in three-dimensional space.

Examples

Basic Examples (2)

Given a 3D triangle, generate a 2D triangle, a matrix and an offset:

 In[1]:=
 Out[1]=

 In[2]:=
 Out[2]=

Scope (2)

Generate a 2D triangle and a transformation function from a 3D triangle:

 In[3]:=
 Out[3]=

 In[4]:=
 Out[4]=

The matrix and offset can be discarded:

 In[5]:=
 Out[5]=
 Out[6]=

Show both triangles in a 3D graphic:

 In[7]:=
 Out[7]=

Neat Examples (3)

Find triangles of a polyhedron:

 In[8]:=

Look at the 2D triangle for one of them:

 In[9]:=
 Out[9]=

Draw tangent spheres on each triangle:

 In[10]:=
 Out[10]=

Version History

• 1.1.0 – 14 June 2021
• 1.0.0 – 21 October 2019