Sierpinski pentagon: Difference between revisions
Content deleted Content added
Line 8: | Line 8: | ||
<br><br> |
<br><br> |
||
=={{header|C}}== |
=={{header|C}}== |
||
The Sierpinski fractals can be generated via the [http://mathworld.wolfram.com/ChaosGame.html Chaos Game]. This implementation thus generalizes the [[Chaos game]] C implementation on Rosettacode. As the number of sides increases, the number of iterations must increase dramatically for a well pronounced fractal ( 30000 for a pentagon). Requires the [http://www.cs.colorado.edu/~main/bgi/cs1300/ WinBGIm] library. |
The Sierpinski fractals can be generated via the [http://mathworld.wolfram.com/ChaosGame.html Chaos Game]. This implementation thus generalizes the [[Chaos game]] C implementation on Rosettacode. As the number of sides increases, the number of iterations must increase dramatically for a well pronounced fractal ( 30000 for a pentagon). This is in keeping with the requirements that the implementation should work for polygons with sides 1 to 4 as well. Requires the [http://www.cs.colorado.edu/~main/bgi/cs1300/ WinBGIm] library. |
||
<lang C> |
<lang C> |
||
/*Abhishek Ghosh, 24th September 2017*/ |
/*Abhishek Ghosh, 24th September 2017*/ |
||
Line 74: | Line 74: | ||
} |
} |
||
</lang> |
</lang> |
||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
For universal solution see [[Fractal tree#Haskell]] |
For universal solution see [[Fractal tree#Haskell]] |