How to generate random holes in a 2D surface?

조회 수: 2 (최근 30일)
DINESH CHANDRA
DINESH CHANDRA 2016년 8월 16일
댓글: DINESH CHANDRA 2016년 8월 16일
1. Generation of a 2D surafce. 2. generation of random holes on 2D surface. 3. Extraction of co-ordinate of holes 4. Meshing of the 2D surface and extraction of node coordinates(if possible)

채택된 답변

KSSV
KSSV 2016년 8월 16일
  댓글 수: 1
DINESH CHANDRA
DINESH CHANDRA 2016년 8월 16일
Thanks for responding.......... Holes are in the shape of circles....

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

추가 답변 (1개)

Image Analyst
Image Analyst 2016년 8월 16일
Create your surface as a matrix. Then create a mask of a bunch of circles using rand() to get locations and/.or radii and the circle FAQ. Then zero out the areas in the surface like this:
yourSurface(circleMask) = 0;

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by