plot 3d - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

plot 3d

murat1290murat1290 Posts: 1Member
can we plot this in 3d
i tried surf but i couldnt draw it.
[img=http://s10.postimage.org/6pyfbh98p/function.jpg]



i solved this question. i found at google isosurface function. its for 3d plot.


answer is
for axises i used daspect([1 1 1]) and it worked fbetter i think ^^ thank you all for help.

clear all
close all
syms X Y Z V
[X,Y,Z] = meshgrid(linspace(-3,3,25));
V = (X.^2+9*Y.^2/4+Z.^2-1).^3 - X.^2.*Z.^3
fv=isosurface(X,Y,Z,V,0)
fv = isosurface(V,0)
fvc = isosurface(V,'red')
p = patch(isosurface(X,Y,Z,V,-0))
isonormals(X,Y,Z,V,p)
set(p,'FaceColor','red','EdgeColor','none');
daspect([1 1 1])
view(3);
axis tight
camlight
and the result is good. to see results: [img=http://s15.postimage.org/nb4pyscrv/kalp.jpg]
Sign In or Register to comment.