I'm trying to generate a random 'bundle' of shapes in 3d space. The shapes are long, rodlike, and approximately cylindrical, i'm trying to position a few of them radially around a central rod randomly with a function. importantly, i want each member rod of the bundle to have a random rotation about its major axis. I can't figure out a reasonable way of doing it. Several strategies have come to me, but I don't know functions that may enable them, primarily some way of finding a 3d shape's orientation/axis.
- after generating the initial central rod, find its major axis, generate radial vectors from it, and place more rods at those radial points after rotating about the major axis. somehow needs to figure out the rod thickness to make the radial displacement within some bounds.
- pre-orient the rod template (or the point cloud it is made from) to a known axis, so that after random reorientation the major axis should be known so radial vectors can be made from it. Rod thickness would be trivially known from x/y size to find radial displacements.
Any 3d image processing wizards that know how to do this?