on 9/1/05 7:45 PM, Tony Hanmer at a.hanmer@gmail.com wrote:
Gerald,

Thanks for the reply.  I do know about using d and any angle instead of f and integer-based angles.  What I'm asking about is angles which must change for each iteration, as the z-order curve shows in
http://en.wikipedia.org/wiki/Z-order_%28curve%29
Any ideas, anyone?

Tony

Interesting curve, Tony.  It's idea seems to me to be a variation on the Peano concept.  I think that the curves cannot be reproduced exactly by Fractint's version of L-systems, for the reason you imply: no way to programatically generate a variable angle.  It shouldn't be hard to come up with L -systems that are geometrically convergent to the diagonals though-- just replace the diagonals with approximating subsegments that get closer to it as the order increases. The problem is the diagonals. In the order 1 Z-curve there's one with length sqrt(2), in the order 2 curve there's one with length sqrt(10), etc., with reference to the unit grid length upon which they're drawn.  These are irrational numbers, so have to be specified as constants-- there's no way to arrive at them by finite sequences of operations available to us:adding to or multiplying lengths .  The same is true of angles for order>1.  Since the L-system code must do all nonconstant calculations geometrically, you're forced to make the diagonals as the hypoteneuse of a right triangle, but there is no way I see to actually draw such a straight line with the commands we have available.

It occurs to me that a simple addition to the commands  would make it possible: the 'g' command moves without drawing.  We need an extra command, say 'k' (don't know if that is used yet or not...?) .  'k' would say to draw a line from the last plotted position to the current position, ie. the geometric summation of all the 'g' commands since the last 'f' would be actualized as a segment.  Then one could move up and over integer amounts on the Z-curve grid with 'g's, then draw the diagonal with a 'k'.  

Still, the approximate solution of drawing the diagonal as a series of zigzags doesn't seem too difficult.  You could make the granularity on the diagonal increase faster with increasing order than the granularity of the main grid, which goes up as power of 2.  Then for high order it would visually appear to be a straight segment.  Maybe more visually interesting would be to limn the diagonals also by a series of 'Z' figures. I think I will play with that approach a little...

The Z-curve, like the Peano curve, doesn't appear to me to be geometrically convergent for the space it fills, ie.  one cannot say that for any point within the area that the point on curve closest to the arbitrary point will have a (normalized) position measurement on the curve that converges as the order of the fractal approaches infinity.   I'd really like to know how to determine when this property  exists for an iteratively generated curve, and how to know when it fails.  

Those are my disjointed thoughts on the Z-curve for the moment anyway, Tony.

========

Hiram Berry