How to apply conditions to fill an area in 3D space?

조회 수: 3 (최근 30일)
Hadi Ghahremannezhad
Hadi Ghahremannezhad 2020년 12월 28일
댓글: Hadi Ghahremannezhad 2021년 1월 4일
I wanted to fill an area in 3D space using some conditions on a vector.
Suppose the vector is:
x1 = 100;
y1 = 100;
z1 = 100;
v1 = [x1, y1, z1];
now I want to assign conditions for
v2 = [x2, y2, z2];
such as:
x2 < x1;
y2 < y1;
z2 < z1;
x1 - x2 < y1 - y2;
y1 - y2 < z1 - z2;
How can I apply these conditions and fill the area in 3D space for all possible values of v2?
I tried using the fill3 function but I am not sure if that is the best options.
  댓글 수: 2
Prudhvi Peddagoni
Prudhvi Peddagoni 2020년 12월 31일
Hi,
You can try something like this.
or you can use fimplicit3 function like this
f = @(x,y,z) x<1 & y<1 & z<1;
fimplicit3(f,[-100 100])
Hope this helps.
Hadi Ghahremannezhad
Hadi Ghahremannezhad 2021년 1월 4일
Thank you. This actually helped.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by