Restricting the range of implicit 3D function

조회 수: 3 (최근 30일)
승준 이
승준 이 2021년 9월 16일
I am new to MATLAB and have been using MATLAB as using implicit functions to render organ shapes such as kidneys and bladders. I have tried simulating a bladder shape with the elliptic function
This implicit function looks like this:
bladder2D=@(x,y) (y.^2-(x-0.5).^(3)+2*(x-0.5)-1);
fimplicit(bladder2D)
If i use the following functions, it 'stacks' the 2D layers to a 3D shape, which follows
h=fimplicit3(@bladder2);
set(h, 'EdgeColor', 'none', 'MeshDensity', 110);
zlim([0,4*pi])
view(-130,30)
function out=bladder2(x,y,z)
bladder1=@(x,y) (y.^2-(x-0.5).^(3)+2*(x-0.5)-1).*(pi*z-z.^2).^(1/2);
s=@(q) min(q./(pi*z-z.^2).^(1/2),1e6);
out=bladder1(s(x),s(y));
end
There are 2 problems to solve: one is that I want to restrict the 'bladder2D' function to around , so that when rendered to 3D, it becomes a bladder shape. The point is that the x value must not be restricted in 3D form; it should be done in the 2D form.
The other problem is that there is a 'hole' on top of the bladder shape, and want to remove this 'hole'. How can i fix these problems?

답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by