Anonymous user
Chaos game: Difference between revisions
Replaced "bitmap" and "bresenham" with "imageman".
(Replaced "bitmap" and "bresenham" with "imageman".) |
|||
Line 1,496:
==={{header|Writing result into an image}}===
{{libheader|imageman}}
<lang Nim>
import bitmap▼
import random
const
Line 1,548 ⟶ 1,545:
const
Iterations = 50_000
Black = ColorRGBU [byte 0, 0, 0]
PointColor = color(255, 255, 0) # Color for points.▼
White = ColorRGBU [byte 255, 255, 255]
# Points in image coordinates.
Line 1,558 ⟶ 1,557:
randomize()
image.fill(Black)
Line 1,575 ⟶ 1,574:
p = ((p.x + T[idx].x) / 2, (p.y + T[idx].y) / 2)
image.
=={{header|PARI/GP}}==
|