Packing identical cylinders into a rectangular prism
조회 수: 7 (최근 30일)
이전 댓글 표시
Dear all,
I need to pack identical cylinders into a rectangular prism (e. g. figure). Is there a way to do this without identifying the cylinders one by one? Can someone help me with this problem?
Thank you!
댓글 수: 2
DGM
2021년 12월 22일
What are the constraints?
Are you trying to find the minumum volume for a fixed number of fixed-size cylinders?
Are you trying to fit a maximum number of fixed-size cylinders into a fixed volume?
Does the cylinder height even matter for the problem?
Is there any preference given to regular packings?
What do you mean "identify the cylinder"?
You need to have a well defined problem before you can solve the problem.
If this just reduces to a circle packing problem, then maybe this is a start:
답변 (2개)
Image Analyst
2021년 12월 22일
I gave you a way to pack them in there tightly in your other question. You can easily adapt it if you want spaces between the cylinders. The volume is just the area times the height of course.
댓글 수: 12
Image Analyst
2021년 12월 23일
You should not call your script cylinder.m since sylinder is the name of a built-in function. What does this say
which -all cylinder
John D'Errico
2021년 12월 22일
Sorry, but no, there is no simple mathematical formula to perform maximal circle packing of a known radius circle into a given domain. Since your cylinders will be the height of the domain, the height is known. And that means this is just a circle packing problem, in a rectangular domain, so just a 2-d problem. A hexagonal close packed solution is probably at least close to optimal, but along the edges, you may be able to do just a bit better, depending on the dimensions of the rect and the circle radius.
If you then say you don't know the orientation of the cylinders, so you don't know the height, then it is just THREE independent circle packing problems. Solve it three times, once along each axis of the domain. In each case, it becomes a circle packing problem in a rect.
Once you know how many circles can fit into the rect, computing the volume is trivial. Just multiply the area of one circle with the height, then multiply by the number of circles you were able to fit inside. But there is no formula to give you the circle locations or the number of circles.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!