How to plot the following surface

How to plot the following surface:
Which type of parametrization is required to plot it... please give me a code

 採用された回答

Matt J
Matt J 2022 年 6 月 10 日

2 投票

fsurf(@(x,y) sqrt(x.^2+y.^2)+1, [-3 3 -3 3] )
zlim([1,3])

1 件のコメント

Atom
Atom 2022 年 6 月 10 日
編集済み: Atom 2022 年 6 月 10 日
Would you please show the axes in such a way that the intersect at the vertex (0,0,1) of the inverted cone z-axis vertical along verted upward?

サインインしてコメントする。

その他の回答 (2 件)

Matt J
Matt J 2022 年 6 月 10 日
編集済み: Matt J 2022 年 6 月 10 日

2 投票

fimplicit3(@(x,y,z) (z-1).^2-x.^2-y.^2, [-3 3 -3 3 1 3] )
Sam Chak
Sam Chak 2022 年 6 月 10 日

2 投票

Sometimes I have troubles visualizing the geometry. Can I plot like this? It should look like an inverted cone.
x = linspace(-sqrt(2), sqrt(2), 41);
y = x;
[X, Y] = meshgrid(x, y);
Z = sqrt(X.^2 + Y.^2) + 1;
surf(X, Y, Z)

4 件のコメント

Atom
Atom 2022 年 6 月 10 日
x = linspace(-sqrt(2), sqrt(2), 41); what does it mean? how you have restricted z in [1,3]?
Sam Chak
Sam Chak 2022 年 6 月 10 日
Hi @Atomic
Because the inverted cone appear to be symmetrical, I assumed and solved this equation to find the value of x that gives :
to obtain .
After that, I generated a linearly spaced vector on the x-axis variable, or in simple terms, created 41 points between and.
x = linspace(-sqrt(2), sqrt(2), 41);
And I do the same for the y-axis variable.
x = y
Atom
Atom 2022 年 6 月 10 日
Nice .. thanks a lot
Sam Chak
Sam Chak 2022 年 6 月 10 日
Don't mention it. Aha... now I remember. You are the one who asked how to draw a Cylindrical structure inside a Dome. It's a good learning experience.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2022 年 6 月 10 日

コメント済み:

2022 年 6 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by