PHP GD snowflake fractal
How can you make a Koch Snow开发者_JAVA百科flake Fractal using php gd so that it comes out like this...
Is it possible? Is there another resource I can use?
imageline, imagerotate, imagefill, and imagefilledpolygon are your friends. they're all in the php manual. as far as the math goes, you can add this to your references: http://www.fractaldesign.net/algor.htm
You can create an image and draw lines on it using imageline.
Another posibility is using SVG. Since SVG are basically XML documents, you can make an SVG image by simply echo'ing some XML.
echo '<line x1="'.$startx.'" y1="'.$starty.'" x2="300" y2="300" />';
精彩评论