开发者

PHP GD snowflake fractal

开发者 https://www.devze.com 2023-01-13 11:03 出处:网络
How can you make a Koch Snow开发者_JAVA百科flake Fractal using php gd so that it comes out like this...

How can you make a Koch Snow开发者_JAVA百科flake Fractal using php gd so that it comes out like this...


PHP GD snowflake fractal

PHP GD snowflake fractal


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" />';
0

精彩评论

暂无评论...
验证码 换一张
取 消