Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

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

[Thread Prev] [Thread Next]

Subject: truchet
From: mwforum@xxxxxxxxxxxxxxxxxx (Mike Sandy)
Date: Fri, 1 Oct 2004 20:37:56 +0100

This program is intended for those fascinated
by patterns.
When the topic of Truchet tiles 
(http://www.counton.org/explorer/     
the section on morphing tiles) 
came up on the Forum some time ago, 
I wrote a program to generate a tiling, 
starting from some combination of
tiles. Wendy suggested I make it more 
user-friendly, so after much prodding 
here is the result.

The tiling can be formed in two ways: one 
(not so user friendly) primarily
using (maths) transformations; the other by user design.
Either way a rectangular design is first formed,
from the basic Truchet tiles, which is then, 
in usual tiling fashion, copied in two directions
(perpendicular in this case).
The tiles are conveniently referred to by their
MW shapes numbers.

The transformation method involves taking a
list of tiles e.g.  1 3 4 2  which forms the
first row of the design. Subsequent rows are
formed by modifying this list with any procedure
which can operate on a list e.g. reverse, bf, fput 3,
cycle 2 (shifts the items 2 places to the right
in a cyclic fashion).

If the first row is shuffled, a very large number of
patterns can be generated in a short time.

Since values are entered into textboxes, it's convenient
to use ctrl-a, ctrl-x, ctrl-c, ctrl-v at times. Using
presentationmode stops this.

The user design method forms the rectangular design by
moving shapes onto a template of squares.

Both methods can use different coloured tiles,
the colours being chosen by the user from a
standard MW colour bar.

The designs formed can be saved as text lists (.tru),
which can then be loaded or erased.

I've made no attempt to save the patterns as image
files(.gif, &c.). I use screen-capture & PaintShop Pro.
Savepict leaves a large white boundary. The graphics 
tool can be used to select an image followed by
export picture, but any transparent regions will have
color 130 (instead of white)

The attached .zip file contains the program and some
.tru files of patterns. Put the files into your program
directory.

Read the INTRODUCTION and INSTRUCTIONS carefully.

As usual you can modify the program for your own use,
e.g. move buttons around, change labels, add procedures. 

I thank Dale Reed for his helpful criticism
and patience.

Mike

Attachment: truchet.zip
Description: Zip compressed data


  • Previous by thread: MIA, Ask an Expert: a star
  • Next by thread: truchet

  • 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