Using Logo to create a tessellation from a triangular motif
Download MSW Logo
Online resources: Basic introduction to using Logo programs, More advanced
help, Programming
resources
Star/hexagon tessellation
Programs
The photo on the right shows some of the Cosmati tiling in Westminster Cathedral. The programs on this page tessellate the triangular motif in this tiling in a radial (hexagonal) direction. They were created to accompany an article written for the Journal of Mathematics and the Arts, special edition for teachers.
The table summarises the procedures, and what each one does, together with the point on the figure created at which the cursor starts and finishes (useful information if you plan to put procedures together to create larger programs). All the procedures use the variable a, which is the side length of the smallest equilateral triangle.
You can see the stages of the tessellation by using this display program (10 is a good side length for this), and the small triangles and motifs of which it is made by using this display program (25 is a good side length for this).
Executing the programs
- Open Logo
- Click Edall on the Commander
- Copy the program into the editing panel
- Select File>Save and exit
- Type the program name followed by the side length required without a colon (suggested values given in the table)
- Click Execute or press Enter
Other useful information:
- To clear the screen, use the command cs (clear screen)
- To hide the cursor (turtle), use the command ht (hide turtle), to show the cursor use the command st (show turtle)
- To see the program step by step, select Step before clicking Execute
|
Suggested value for a |
Brief description |
| triangleu :a |
100 |
small equilateral triangle, vertex pointing upwards |
| triangled :a |
100 |
small equilateral triangle, vertex pointing downwards |
| trimotifu :a |
50 |
basic triangular motif, vertex pointing upwards |
| trimotifd :a |
50 |
basic triangular motif, vertex pointing downwards |
| 3tri :a |
25 |
strip of three triangular motifs, long edge up |
| 5tri :a |
25 |
strip of five triangular motifs, long edge up |
| hextri :a |
25 |
hexagonal tessellation of triangular motifs |
| hextri2 :a |
15 |
hexagonal tessellation of triangular motifs, 2nd layer added |
| hextri3 :a |
12 |
hexagonal tessellation of triangular motifs, 2nd and 3rd layers added |
Top
Programs
Start and finish positions are added - they will not appear when the programs are executed.
to triangleu :a
rt 30
repeat 3[fd :a rt 120]
lt 30
end
Top
|
|
to triangled :a
rt 90
repeat 3[fd :a rt 120]
lt 90
end
Top
|
|
to trimotifu :a
rt 180 trimotifd :a rt 180
end
Top
|
|
to trimotifd :a
triangled :a*6
pu rt 90 fd :a rt 60 fd :a lt 150 pd
triangled :a*3
pu rt 150 fd :a lt 150 pd
triangleu :a
pu rt 90 fd :a lt 90 pd
triangleu :a
pu lt 150 fd :a rt 150 pd
triangleu :a
pu lt 90 fd :a rt 60 fd :a*3 rt 30 pd
end
Top
|
|
to 3tri :a
trimotifd :a
pu rt 90 fd :a*6 rt 60 fd :a*6 lt 150 pd
trimotifu :a
pu lt 30 fd :a*6 rt 30 pd
trimotifd :a
pu rt 90 fd :a*6 lt 30 pd
end
Top
|
|
to 5tri :a
repeat 2[trimotifd :a
pu rt 90 fd :a*6 rt 60 fd :a*6 lt 150 pd
trimotifu :a
pu lt 30 fd :a*6 rt 30 pd]
trimotifd :a
pu rt 90 fd :a*6 lt 30 pd
end
Top
|
|
to hextri :a
repeat 3[trimotifd :a trimotifu :a rt 60]
pu rt 150 fd :a*6 rt 30 pd
end
Top
|
|
to hextri2 :a
hextri :a
pu lt 30 fd :a*6 rt 30 pd
repeat 6[3tri :a]
end
Top
|
|
to hextri3 :a
hextri2 :a
pu lt 30 fd :a*6 rt 30 pd
repeat 6[5tri :a]
end
Top |
|
to display :a
cs ht
pu lt 90 fd 480 rt 90 pd
trimotifd :a
pu rt 90 fd :a*18 lt 90 pd
hextri :a
pu rt 90 fd :a*25 rt 60 fd :a*6 lt 150 pd
hextri2 :a
pu rt 90 fd :a*36 rt 60 fd :a*12 lt 150 pd
hextri3 :a
end
Top
|
|
to display2 :a
cs ht
pu lt 90 fd 300 rt 90 pd
triangleu :a
pu rt 90 fd :a*3 lt 90 pd
triangled :a
pu rt 90 fd :a*10 lt 90 pd
trimotifu :a
pu rt 90 fd :a*3 lt 90 pd
trimotifd :a
end |
|
|