As a hobby, I am trying to use Mathematica and Wolfram Language as a tool for making generative artworks. Generative art techniques may require drawing millions of points, lines, or curves. For example, here is an image of a random attractor produced by Paul Bourke:
Because Mathematica (I believe) uses vector graphics, dealing with millions of primitives quickly becomes an issue. For example, the following graphic, which consists of nearly a million points, takes 22 seconds to render on my machine.
stroke = Table[{x, Cos[x]}, {x, 0, 3 Pi, .01}] // Point;
Translate[stroke, #] & /@
RandomInteger[{0, 100}, {1000, 2}] // Graphics
This particular example could be improved by using Rasterize
on the stroke, but what if one wants to (understandably) vary each stroke that is drawn? Is there a convenient way to handle the creation of such works in Mathematica?
Also see this example attractor from the demonstrations project, which runs very slowly on my machine with only 150,000 points.
Translate[]
in your specific example:Graphics[Translate[Point[Table[{x, Cos[x]}, {x, 0, 3 Pi, .01}]], RandomInteger[{0, 100}, {1000, 2}]]]
$\endgroup$