getting a radial vector relative to a 3d shape of unknown orientation

1 visualización (últimos 30 días)
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.
  1. 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.
  2. 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.
Rod example
Any 3d image processing wizards that know how to do this?

Respuesta aceptada

Carson Purnell
Carson Purnell el 17 de Jun. de 2022
With this info, it's possible to make random radial vectors from that axis.

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by