Dragon curve/C: Difference between revisions

m
Fixed syntax highlighting.
No edit summary
m (Fixed syntax highlighting.)
 
Line 1:
It uses an [[wp:L-system|L-system]] in order to generate the curve, the code from [[Raster graphics operations]] ("<tt>imglib.h</tt>") to produce the output in PPM format, and the code from [[Basic string manipulation functions]] (<tt>estrings.h</tt>) to manipulate strings keeping the ''evolution'' of the system.
 
<langsyntaxhighlight lang="c">#include <stdio.h>
#include <string.h>
#include "imglib.h"
Line 123:
destroyString(seed);
return 0;
}</langsyntaxhighlight>
 
'''Note''': the color feature does not color "layers" of the run (like Algol); it just adds colors to the segments cyclically, making "noise" rather than delightful make up.
9,485

edits