This function subdivides one triangle into either two or three more based on the Penrose tiling rules.

subdivide(shape, point1_x, point1_y, point2_x, point2_y, point3_x, point3_y)

Arguments

shape

Either "t" or "T" for a thin or thick triangle

point1_x

x position of the first point

point1_y

y position of the first point

point2_x

x position of the middle point

point2_y

y position of the middle point

point3_x

x position of the last point

point3_y

y position of the last point

Value

A data set of triangles

Details

If the shape is "t", there will be two triangles. If the shape is "T" or anything else, there will be three triangles. The point2_x and point2_y parameters determine the middle of the triangle. Which side point1_x and point1_y versus point3_x and point3_y determines if it is a left or right triangle. This function is mostly used internally.