------ =_NextPart_000_01BCFDB8.A4123E00

Content-Type: text/plain; charset="us-ascii"

Content-Transfer-Encoding: 7bit

Greetings.

Included herein is a compressed archive of two files:

a .txt file which is a set of UCB Logo routines which produce

a space-filling curve that fills up a hexagonal region, and

a .bmp file which shows what each of the routines a, b, c, d do.

The main routine, fractal, has two parameters:

radius is the radius of a circle which circumscribes the hexagonal

region, centered about the origin.

maxd is the maximum depth of recursion you want to reach.

fractal 300 7 looks interesting; 300 8 is probably too dense.

I am sending this out in the hopes that it might spark interest in

fractals and how to create them with Logo. Of course this may be

copied & modified any way you want. There are several topics that

this touches on:

fractals, space-filling curves, recursion, stack usage, tree traversal,

sin <----> cos in Logo, passing parameters,

the specific parameters rev and flip, avoiding error buildup.

The basic idea here is that at each recursive step, each line segment of

the polygon is replaced by four line segments. There are four different

patterns, or ways in which a line segment gets replaced by four segments.

each line segment corresponds to a triangular region which its "progeny"

will eventually fill up.

This isn't much of an explanation; I'm hoping the details are not too

difficult to work out. Please email me if you have questions or if you have

difficulty accessing the compressed archive.PLEASE include the word

David in the subject, to distinguish from my father.

There is one point I feel compelled to address: Pattern d is labeled with

rev but not flip, indicating that it can be reversed but there is no need to

make the mirror image, because the triangular region it will fill is symmetric

about the axis of the original line segment. Yet the routine d does not have

rev as a parameter. This is because the only place d is called is within b,

and there is no need to reverse the order of the pattern there.

Enjoy!

David Bush

------ =_NextPart_000_01BCFDB8.A4123E00

Content-Type: application/x-zip-compressed; name="logofract.zip"

Content-Transfer-Encoding: base64

<encoded_portion_removed>

------ =_NextPart_000_01BCFDB8.A4123E00--

---------------------------------------------------------------