Well, an abstract description of processes like these always lends extra heft to what your brain will try to rationalize out of a written description. Especially with computational "decision making" people have a tendency to conjure up ghosts or perhaps a little gremlin at the heart of a nest of wires, watching a TV set, and ruminating over what to do next.

But when you stop and think about what collimation actually is, it's just a manner of focusing a projected beam, either with masking, and obstructing the path of a beam (as with x-rays which are high energey photon beams), or also possibly by bending and focusing a beam, using magnets to direct a beam of charged particles (such as positrons).

So, if working in three dimensions, you might wish to control depth of penetration, but honestly, with X-rays you'll only have so much success, so it's really about how many beams converge upon a region, and the shape they create as they cross over each other, while intersecting, when projected from different angles.

There are a number of ways to approach this strategy, of creating three dimensional shapes, by drawing cross-sections in modern 3D animation programs, like Maya and 3D Studio Max.

The easiest way is to draw a spline or a bezier curve, along one axis, then apply a "lathing" function, which duplicates the spline, rotating about the axis, and then connecting the splines at each control point on the spline/curve. Then you get a crude vase-like shape.

So, take that idea, and apply it to a light source with an articulated aperture. The aperture can create a shadow in the shape of a spline. It might strobe exposures, with small, discrete doses, effectively pixelating or rasterizing the dose with many small exposures, or continuously emit radiation while in motion.

Then, if you attach this beam source to a motorized system, that can rotate the source about an axis on a system of rails, and trigger exposures with different aperture shapes while being positioned around a target at the center of the axis of rotation, hey presto! The software-defined shape has guided the beam, using the same sort of motion control that translates coordinates to a set of motors, as has been done with stop-motion animation cameras in movies for decades!

So, it's like the reverse of a camera, and yes, radiation sources are like flash-bulbs, and you selectively cast shadows, by controlling a gate or shutter, and possibly the shape of the opening in a barrier that stands between the source of the target. (scanline, round dot, square...)

EDIT: As loarake mentions, the actual behavior of a radiation beam is not the same as light. When radiation penetrates a medium, each type of radiation may scatter, reflect, refract differently when interacting with the medium, depending on the material, if it's bone, flesh, metal dental fillings or implanted appliances or something else. Many materials may absorb the radiation and express the interaction by radiating heat, or the radiation will ionize the matter, triggering electrical interactions, and chemical decomposition and reactions. This aspect of radiation is truly the pure random factor (hence monte carlo simulations), the unknowable Schroedinger's cat in a box, but it's real and for every dosage, some radiation will ionize some matter eventually. This along with the conversion to heat is the part that kills tumors, causes burns, and exposes film.