[Thread Prev] [Thread Next]
Daniel's maze reminded me that one can be
generated using truchet tiles.
to block :d :n ;d is tile length, n is the number of tiles per side
cg ht pu
let[xc :d * :n / -2
yc :d * :n / -2]
setpos list :xc :yc
dotimes
[i :n]
[dotimes
[j :n]
[tile :d random 2
setpos list :xc + (:j + 1) * :d ycor
]
setpos list :xc :yc + (:i + 1) * :d
]
end
to tile :d :k
let[xc xcor yc ycor
d :d / 2
k 1 - :k * 2]
setpos list :xc + :k * :d :yc - :d
pd setpos list :xc - :k * :d :yc + :d
pu setpos list :xc :yc
end
Try block 10 35
You can add sliders for :d and :n values
I've generated the tiles in the program but they could
be present as shapes.
Truchet tiles can be used for producinging a great many
patterns.
Visit:
http://www.counton.org/explorer/morphing/04truchet.shtml
There are lots of other ideas at the site.
Mike
_______________________________________________
MWForum mailing list
MWForum@xxxxxxxxxxxxxxxxxx
http://mia.openworldlearning.org/mwforum/
Previous by thread:
Re: Random maze
Next by thread:
Help
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.
|