MATLAB Answers

why the plotted function implicit doesn't have continuous surface?

3 views (last 30 days)
the attached pciture is a rotated cylinder which is plotted with fimplicit3 command in the interval 0 1500
the problem is I dont know why the surface of cylinder is not continuous? I checked the shape in another software that plot it continously but in matlab I have some problem.
in another screen shot you see if I changed the constant of function the plot would be continuous
here is the command i used for the plot with problem:
f = @(x,y,z) (z-x).^2+(x-y).^2+(y-z).^2-1000000;
>> interval=[0 1500];
>> fimplicit3(f,interval)


David Goodmanson
David Goodmanson on 8 Apr 2020
Hi sahand, whatever else is going on, if you do the 1e6 case with an interval of [0 1500] up to [700 1500] in steps of 100, you at least get some nice patterns.
sahand shams eshaghi
sahand shams eshaghi on 8 Apr 2020
thanks for replying.
I still have problem
f = @(x,y,z) (z-x).^2+(x-y).^2+(y-z).^2-1000000;
interval=[700 1500];
>> fimplicit3(f,interval)
shape has more invisible body
see the attachment
I also tried [100 1500] and other ranges
still same problem
step 100 you means increment of 100 from 0 to 700 for lower range?

Sign in to comment.

Accepted Answer

Matt J
Matt J on 8 Apr 2020
Edited: Matt J on 8 Apr 2020
Try increasing the mesh density,


sahand shams eshaghi
sahand shams eshaghi on 8 Apr 2020
is there any command in Matlab that without defining the range of plotted graph, the plotted graph be seen?
it means when I change the function costant I have to find the specific range inorder to see the shape? sometimes my interval is too small I cannot see the shape sometimes its too big as by try and error I have to find the best range.
is there any command that finds the shape automatically and shows the plot? without try and error interval range?

Sign in to comment.

More Answers (1)

sahand shams eshaghi
sahand shams eshaghi on 8 Apr 2020
ok let me make my question simpler:
the interested funciton to be drawn in matlab is:
>> f = @(x,y,z) (z-x).^2+(x-y).^2+(y-z).^2-242 00 000 000;
by this function I have to increase the mesh size but it seems processor cannot run this for mesh size 400 or 500 or even more
is it any solution for this ?
seems alot of calculations involved and it takes more time


Sign in to comment.

Sign in to answer this question.