LOGO-L> random based hexa fractal

;Hello John Gough

;Here is the code for a hexagonal fractal drawn using random points

;Best Regards.

;Mhelhefni.

;-------------------------------------------------------------

to get.point :lev

if :lev =0 [stop]

make "T.pt item 1 + random 6 [[0 0] [400 0] [600 246] [400 492] [0 492][-200

246]]

plot.midpoint :z :T.pt

make "z pos

get.point :lev-1

end

to go ;start

make "z list random 600 random 600 cs ht

;setpensize [2 2]

get.point 10000

end

to plot.midpoint :Pt.1 :Pt.2

pu setx -100+ ((first :Pt.1) + (first :Pt.2)) / 3

sety -100+ ((last :Pt.1) + (last :Pt.2)) / 3

pd fd 0 pu

end

;--------------------------------------------------------------

John Gough wrote :-

I have tried some of the obvious adaptations of this "game" to see if I

could generate a Sierpinski "square", also known as a "carpet" where the

triangle is known as a "gasket". Start with four points instead of three,

and roll as before, then move to the midpoint between where you last were

and the new rolled point. But so far none of my attempts have worked.

Similarly, changing from midpoint constructions to trisection constructions

does not result in anything except a random filling in of the entire

triangle.

Maybe someone out there can suggest other chaotic "games" which generate

surprising fractal images. The book discusses a set of transformations

which result in the fern fractal, but I haven't been able to identify a

suitable set of four transformations. Maybe I'm missing something in my

reading of the book.

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