Restricting the range of implicit 3D function

4 visualizzazioni (ultimi 30 giorni)
승준 이
승준 이 il 16 Set 2021
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?

Risposte (0)

Categorie

Scopri di più su Medical Physics in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by