Possibly one of the first macros that were written for Pov-Ray when the conditional statements were implemented, although I don’t know who was the first to devise it or write it. My CAT macro for scanning of objects is based on the idea that was used here.
- Before use you must declare the object to be cut in pieces:
(p.e #declare My_Box = box{…}) - The macro will create N-copies of the object in question, one for each slice in which it is to chop.
- Each “piece” of the object is achieved by CSG intersection between the original object and a box that moves up to each slice, and sideways (set by the rnd_amount parameter) to simulate a bit of randomness.
Download (right click and ”Save target as”) : slices.mcr
Updated 16/January/2012 (Fixed the source and added the rnd_amount parameter for setting the amount of randomness)
Updated 16/January/2012 (Fixed the source and added the rnd_amount parameter for setting the amount of randomness)


