Image_Turtle is a image drawing system work with Lindenmayer system. It is made by Kore Nordmann, one of the lead of the Image_3D project. The class is called turtle is because the line drawing item is referred as turtle, like the one in the Logo programming language.
The tree below is generated by this code:
require_once 'Image/Turtle/Memory.php'; $turtle = new Image_Turtle_Memory(array(310, 590), -90); // Configure turtle $turtle->step = 130; // Width of step forward $turtle->a = 25; // Angle $turtle->s = .25; // Buckling // Create and execute the "programm" $turtle->addRule('w', 'FFF[+F+F+F][-F+F+F+F+F]'); $turtle->addRule('F', 'FFF[+F+F+F][-F+F+F+F+F]'); $turtle->setStartRule('w'); $turtle->process(3); // Render output $turtle->render(400, 600, 'tree.png');

Here is another image by Image_Turtle

Editor Comment:
Kore Nordmann have done a lot of work on image generation. Anyone who wants try out Logo, check out the Logo Class in PHP
Comments
Post new comment