A few months ago, I was in the middle of another Perl project, and on an impulse took time out to try something new. As is often the case, I didn't expect it would take more than a few days to finish it.

When passed two or more arguments, the first specifies how many "generations" to evolve each fractal. The second argument(and any remaining arguments) specify what shape to draw, and how to evolve it.

You can either use give the coordinates of the shape, or use a shorthand ('#t' for triangle, '#s' for square, '#p' for pentagon', and '#h' for hexagon), followed by an optional algorithm. If no algorithm is given, an algorithm will be generated randomly.

For example, to draw a square (and evolve it with a random algorithm for 4 generations) you could do either of:

The second form specifies to start at location (x,y) = (100,100) (in the lower left corner of the Tk window), and draw the first line at an angle of 90 degrees for 400 pixels. The next 3 lines are then drawn with -90 degree angles, also for 400 pixels each.

The algorithm should given by putting '=' immediately after the shape definition, followed by the algorithm. Each line segment of the current shape is permuted according to the algorithm, where the following symbols are used:

. => don't permute this portion of the line segment
! => go to next portion of line segment (next rule)
A*B => specify next angle/distance for this portion
, => go on to next angle/distance
+ => complete journey to next point in line segment

In the above example, the algorithm divides each line segment into 3 portions with the following rules:

. # Do not change the first portion
60*1,+ # Rotate 60 degrees away from the current
# heading, for a distance equal to 1 times
# the length of the current portion of the
# line segment. (The '*1' can be omitted,
# without changing the effect). Then,
# draw a final line completing the trip
# to the next point beginning the next
# portion of the line segment.
. # Do not change the last portion

which will create a square, and then replace the middle third of each line segment with a 90 degree angle going the length of that portion, followed by a -90 degree angle for half the length, followed by another -90 degree angle for 1.5 times the length. In this case, there is no '+', so the resulting shape will be discontinuous each time.

I hope you have as much fun watching it as I do!

Update: Can you figure out why the plaintext "FRaCtal:" and salt "rp" were used as arguments to the crypt function?

This is the best thing I've ever seen. I'd have been impressed if that code did anything at all, or if you provided 5 pages of code to do what your program does. This left me speechless. (Well, I spoke, but I only said NSFW words...)

Just by writing a Perl script to randomly choose plaintext strings, using upper or lower case for each letter of "fractal:" at random, and then test those with every legal salt value, until the output of crypt gave me the desired result!

Very nice! As others have said, it would be an impressive obfu if it did anything at all, and what it does is impressive all on its own. But, as much as I'd like to just let it run all day, it does have a memory leak somewhat akin to the "leak" at the Hoover dam. Still incredibly impressive.

Way to do it YET again! ++liverpole!!
Your obfus are always brilliant and very entertaining.
But this one is warping my mind! Hell of a job! I love that
you can run it over and over for different warpings
Hell of a job!!