how can i plot 3D ellipsoid

28 ビュー (過去 30 日間)
Marsu567
Marsu567 2020 年 5 月 9 日
編集済み: Euclides 2023 年 7 月 14 日
Hi
I would like to plot a 3D ellipsoid without matlab's functions and thanks to an implicit equation
Best regard
  2 件のコメント
James Tursa
James Tursa 2020 年 5 月 9 日
"... without matlab's functions ..."
What does this mean? As written, this is impossible.
Marsu567
Marsu567 2020 年 5 月 9 日
Sans utiliser une fonction ou fontionnalité préprogrammée dans matlab tel ellipsoid() ou fimplicit() ou autres
Merci

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

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 5 月 9 日
Try this
a = 1;
b = 0.5;
c = 2;
f = @(x,y,z) (x/a).^2 + (y/b).^2 + (z/c).^2 - 1;
fimplicit3(f, [-3 3 -3 3 -3 3]);
axis equal
  3 件のコメント
Marsu567
Marsu567 2020 年 5 月 10 日
x = -1:1/100:1;
z = -1: 2/100 :1;
N = length(x);
N1 = length(z);
Zc = zeros(N1,N);
Xc = zeros(N1,N);
for i = 1:N
for j = 1:N1
[Xc, Yc] =meshgrid(x,z);
Zc(j,i) =sqrt(1-(Xc(j,i).^2)/2-(Yc(j,i).^2)/2)/2;
end
end
Xc = 0.05*Xc;
Yc = Yc;
Zc = 0.05*Zc;
surf(Xc, Yc, Zc)
Euclides
Euclides 2023 年 7 月 14 日
編集済み: Euclides 2023 年 7 月 14 日
quick question....... is it possible to replicate this sort of plot by using only the ellipsoidal radius (i.e, a function of theta, phi, a, b, and c)? For instance, for the ellipse, I can use the elliptical radius in polar coordinates (function of phi, a and b) and then use the in-built polarplot function to visualize ellipses of various shapes. I am looking for something equivalent for the ellipsoid case, but haven't found it so far. There is the in-built ellipsoid function, but that uses Cartesian coordinates and I want to directly use the ellipsoidal radius function. Any help is very welcome!

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

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by