LOGO-L> logo fractal 
Author Message
 LOGO-L> logo fractal

------ =_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--

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





Thu, 18 May 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. LOGO-L> Logo fractal 3: flower

2. LOGO-L> logo fractal 2: snowflake

3. LOGO-L> Apple logo/MSW Logo

4. LOGO-L> Reseach Machines Logo (RM LOGO)

5. LOGO-L> What is a Fractal

6. LOGO-L> Dragon Fractal

7. LOGO-L> animated fractal gifs

8. LOGO-L> octastar fractal

9. LOGO-L> Animated Koch's Fractal

10. LOGO-L> Shortest Fractal

11. LOGO-L> random based hexa fractal

12. LOGO-L> random generated penta fractal

 

 
Powered by phpBB® Forum Software