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

조회 수: 1 (최근 30일)
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?

채택된 답변

Carson Purnell
Carson Purnell 2022년 6월 17일
With this info, it's possible to make random radial vectors from that axis.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by