The points in the point-cloud can each have individual material properties. Only the properties that are used will be stored in the cache file.
Every iteration of the chaos game, the current position is aligned to a grid where either a point is created, or the already existing point there is updated with the size/color/reflection of the current transform. The grid density is determined by the sphere_packing parameter. An average is calculated for each point after the point-cloud is generated to get the final properties of the point at each position.
Each point is represented by a sphere that can have an individual radius.
Set with the commands sphere_radius, sphere_radius_factor or sphere_grow.
Having this option is the main reason for keeping the point-cloud approach.
A sphere not in the buffer that would slowly grow into view would be missed by the z-buffer approach (only storing the spheres actually hit by a ray).
The color of the sphere.
A palette is used to determine the color that a point will get.
2d IFS programs generally use a one-dimensional palette, an array of colors, each transform contains a reference to a certain position in that array.
Styrofoam IFS uses a two-dimensional palette instead.
The color used will be the halfway point between where the last color was retrieved and the color of the current transform. The command
color 0,1 on a transform means that each time the transform gets selected, the color selector will move towards
the bottom right corner of the palette.
0,0 is the upper left corner of the palette, 1,1 is the bottom right corner.
The default palette is given below, values are red, green, blue.
Eg. The color at 0.25,0.6 is calculated as (1-0.6)*((1-0.25)*color00 + 0.25*color10) + 0.6*(1-0.25)*color01 + 0.25*color11).
Change the palette with the commands color00, color10, color01, color11.
|color00 = 0.18, 0.44, 0.15
||color10 = 0.691, 0.195, 0.168
|color01 = 1.0, 0.737, 0.314
||color11 = 0.945, 0.898, 0.844
To create a more intricate palette, create a png image with the palette and use the command color_png to use it.
Points between pixels are calculated as an average, as in the original palette above.
How big portion of the incoming ray that hits a point that will get reflected.
Set with the command reflection.