volume tessellation with spheres

조회 수: 2 (최근 30일)
bob
bob 2013년 10월 1일
댓글: Cedric 2013년 10월 4일
Hey guys,
I have some irregular-shape particles as stl. What I need to do is to fill the volume with regular array of spheres, like cubic array. Having a control on the size of filling spheres (which is the same for all the spheres) will be useful.
Any idea?
  댓글 수: 7
bob
bob 2013년 10월 3일
no, I'm not. But let's say I got it. The main thing is still there.
Cedric
Cedric 2013년 10월 4일
편집: Cedric 2013년 10월 4일
No, assume that you've got it, then you build a regular lattice of sphere centers, which is a basic array of 3D coordinates that covers the extent of the particulate. This is easy to do as it is a rectangular volume (framing the original particulate); assuming that you have your STL nodes coordinates in a nx3 array named nodes, you'd do something like
r = .. ; % Spheres radius.
mins = min(nodes) ;
maxs = max(nodes) ;
[X,Y,Z] = ndgrid( mins(1):2*r:maxs(1), ...
mins(2):2*r:maxs(2), ...
mins(3):2*r:maxs(3) ) ;
centers = [X(:),Y(:),Z(:)] ; % If needed, but you might be
% able to work directly with
% X, Y, and Z.
I didn't read the description of the FEX function written by Sven, but assuming that it works on arrays of points and with a non-convex polyhedron, basically the next step is just to submit the internal buffer STL and the array of centers to know which ones define spheres inside the original particulate.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 10월 1일
The cellphone tower optimization problem solves this as a constrained optimization with circles inside of a square. I would recommend starting with this and modifying it to be three dimensional with irregular boundary constraints.
  댓글 수: 2
bob
bob 2013년 10월 1일
Good idea! OK, I give it a try.
Thanks
Sean de Wolski
Sean de Wolski 2013년 10월 1일
Thinking about it some more, I'm not sure this will work with a non-convex shape...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by