Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: Trefoil knot &c.
From: mwforum@xxxxxxxxxxxxxxxxxx (Mike Sandy)
Date: Tue, 10 Jun 2003 19:41:40 +0100

I wrote a program for MSWLogo which simulates a trefoil
knot with a 3D effect. The knot was constructed from abutted lunes.
The interleaving was acheived by a recursive method.
The overlapping was done by drawing the lunes over a previous strand,
which is impossible in MW because of the limitations of the FILL.
The program was fast.

MW can obliterate an underlying graphic by stamping with a turtle shape,
so the trefoil lune can be made by drawing the lune on the page, turning
it into a turtle shape with SNAPAREA, then obliterating the area by
stamping with a turtle with a shape in the form of a large enough
rectangular area with the same colour as the background. The construction
of the lune can be hidden under the turtle which does the removal.

Before I got to this stage, I'd mentioned the problem to Wendy, but in the
form of three interlocking circles and as usual she cut through my
complications and suggested an alternative approach.

Draw the base colour in with a large pensize and then overdraw with the arcs
making up the lunes(the individual lune construction not necessary).
The three circles can be drawn by three separate turtles.
A problem arises at the joins - extra arcs have to be drawn or previous area
copied and then re-stamped.
Her solution will be found at the Maths Cats' sight but is not completely

Wendy's method can be used, with multiple turtles, for any completely
interwoven pattern but it means additional data has to be provided.
With three circles the method is very fast.

The separate lunes are simpler, very much slower, but have an
advantage with knotty problems.
In the recursive method the pattern is broken up into sements, which
alternate under and over each other. The recursion involves drawing
all the underlying segments first and leaving blanks for the others.
The blanks are filled in on return from the recursion.
Instead of lunes just a bordered plain colour can be used - very much


Attachment: trefoil.mw2
Description: Binary data

Attachment: weave.circles.nr.mw2
Description: Binary data

  • Previous by thread: Quiz Project
  • Next by thread: accessing attachments

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008