Mandelbrot set: Difference between revisions
Content deleted Content added
→{{header|C}}: adapted code to use raster gfx ops tasks, fixed eye-jumped bugs, but running it I cant see the mandelbrot set, so needing review; hopefuly not my fault while fixing;) |
m →{{header|C}}: fixed (was 0 -> x0 -> y0 !) |
||
Line 4: | Line 4: | ||
=={{header|C}}== |
=={{header|C}}== |
||
{{needs-review|C}} |
|||
(The original code needed fixing; after fixing, it compiles and run, but to me it produced [http://i42.tinypic.com/122cls4.jpg this], not a Mandelbrot set as far as I can see) |
|||
This code uses functions from category [[:Category:Raster graphics operations| Raster graphics operations]]. |
This code uses functions from category [[:Category:Raster graphics operations| Raster graphics operations]]. |
||
Line 34: | Line 30: | ||
while (((x0*x0 + y0*y0) <= 4.0) && (i < MAX_ITERATIONS)){ |
while (((x0*x0 + y0*y0) <= 4.0) && (i < MAX_ITERATIONS)){ |
||
xtemp = x0*x0 - y0*y0 + cr; |
xtemp = x0*x0 - y0*y0 + cr; |
||
y0 = 2*x0* |
y0 = 2*x0*y0 + ci; |
||
x0 = xtemp; |
x0 = xtemp; |
||
i++; |
i++; |