필터 지우기
필터 지우기

fill a polygon with circles without intersection

조회 수: 3 (최근 30일)
Hamza
Hamza 2013년 12월 4일
댓글: Image Analyst 2014년 5월 29일
I want to create a random a polygon thin I want to fill the polygon with circles with 3 different radiuses I want to fill it first using the largest radius then with the smaller radiuses but the circles should not intersect with the polygon or with other circles please help me

채택된 답변

Image Analyst
Image Analyst 2013년 12월 4일
What form do you want the image in? A list of centers and radii? Or an image. If you want an image (2D array) you can do it with a loop and a series of steps where you call bwdist() (to find out where the largest circle can go), then poly2mask() to drop the next circle there. When bwdist indicates that there can be no more circles of that size, then you drop down to the next largest circle. Keep looping until you can't fit anymore of the smallest circle. Not hard at all if you want an image and have the Image Processing Toolbox. If that's how you want to do it, and can't figure out how to put my algorithm into code, let me know.
  댓글 수: 1
Hamza
Hamza 2013년 12월 4일
thanks for reply Image Analyst I want it as a list of centers and radiuses then draw it in 2D I want a polygon filed with circles but it should not intersect yes please help me with code

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

추가 답변 (1개)

Hamza
Hamza 2013년 12월 5일
Anyone can help me with the code please ?
  댓글 수: 4
fouzia razzaque
fouzia razzaque 2014년 5월 29일
when I try to open the link provided by image analyst it shows, 'page cannot be displayed' :( need help

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

카테고리

Help CenterFile Exchange에서 Volume Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by