graphing inplicit quadric equations
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to graph five different quadric surfaces and don't know the name of them. the idea is to see the shame and name them. that being said is there a keyword in matlab that allows the input of a equation and the output is a graph of the 3d surface. I know that I can use plot3(x,y,z,) but this is not really helpful when I can't input the equation as it is given.
the one of the equations is as follows:
y^2=z^2-x^2+1
0 件のコメント
採用された回答
Dishant Arora
2012 年 9 月 1 日
It would'v been a lot easier if we were able to express the function explicitly, but since it cant be expressed explicitly, we must parameterize it and in this case parameterization takes the following form
x=sqrt(1+z^2)*cos(phi)
y=sqrt(1+z^2)*sin(phi)
once you are done with parameterization, you can plot it like shown below:
[phi, Z] = meshgrid((0:0.1:2)*pi, (-2:0.1:2));
X=sqrt(1+Z.^2).*cos(phi);
Y=sqrt(1+Z.^2).*sin(phi);
surf(X, Y, Z);
0 件のコメント
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!