C# component for bounding box with random mesh in Grasshopper

Hi there, i’m learning a raytracing and shadow project, and would like to ask how to script a C# component for a bounding box that contains small meshes with 3 or 4 vertices, facing random directions. The size of the bounding box and number of meshes should be controlled by 2 sliders.

Something like this:

which taken from this shadow art graphics website: https://graphics.stanford.edu/~niloy/research/shadowArt/shadowArt_sigA_09.html.

Thanks!

Well … to me it looks like a 2 phase task:

  1. Get voxels out of (preferably) meshes,

  1. On the fly modify the mesh (from boxes) collections in order to achieve some desired projection. This means also: keep track of your previous steps (history, so to speak),

If so … 1 is more or less achievable without advanced C# skills. 2 on the other hand is more tricky.