Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1498
Number of posts: 2178

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
plot 3d Posted by murat1290 on 12 Sept 2012 at 4:57 AM
can we plot this in 3d
i tried surf but i couldnt draw it.




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:
Thread Tree
murat1290 plot 3d on 12 Sept 2012 at 4:57 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.