# Ellipsoid is showing as a sphere

4 ビュー (過去 30 日間)
Kevin Hanekom 2021 年 4 月 15 日
コメント済み: Kevin Hanekom 2021 年 4 月 15 日
Hello all,
I have spent the last couple hours trying to figure out why my code only shows my figure as a sphere when it is supposed to be elliptical. I've attached my code and a picture from anouther 3d website to hopefully help figure out where im messing up. Could it be the isosurface twisting my data? Thank you all who spend there time looking at ths!
clc; clear;
sig1c = -15; %always set compression as negative
sig1t = 1; %always set tension as positve
sig2c = -6;
sig2t = 1;
sig3c = -2;
sig3t = 5;
F1 = ((1/sig1t)-(1/sig1c));
F2 = ((1/sig2t)-(1/sig2c));
F3 = ((1/sig3t)-(1/sig3c));
F11 = (1/(sig1c*sig1t));
F22 = (1/(sig2c*sig2t));
F33 = (1/(sig3c*sig3t));
syms sig1 sig2 sig3 G
[sig1,sig2,sig3] = meshgrid(linspace(-30,30,100));
sig1b = 0;
sig2b = 0;
sig3b = 0;
G = F1.*sig1 + F11.*sig1.^2 + F2.*sig2 + F22.*sig2.^2 + F3.*sig3 + F33.*sig3.^2 - 1;
G(G>1) = 1;
Stich = patch(isosurface(sig1,sig2,sig3,G,0),'Facecolor', 'none', 'Edgecolor', 'blue');
isonormals(sig1,sig2,sig3,G,Stich)
xlabel("\sigma_1");
ylabel("\sigma_2");
zlabel("\sigma_3");
title('Tsai-Wu Yield Surface');
view(3);
##### 2 件のコメント表示非表示 1 件の古いコメント
Kevin Hanekom 2021 年 4 月 15 日
Turns out something simple is always better lol, thank you!

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

### 採用された回答

Image Analyst 2021 年 4 月 15 日
Try
axis equal
or
axis square
##### 1 件のコメント表示非表示 なし
Kevin Hanekom 2021 年 4 月 15 日
You are amazing!! Thank you!

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

R2021a

### Community Treasure Hunt

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

Start Hunting!

Translated by