Ellipsoid is showing as a sphere

1 次查看(过去 30 天)
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 个评论
Kevin Hanekom
Kevin Hanekom 2021-4-15
Turns out something simple is always better lol, thank you!

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2021-4-15
Try
axis equal
or
axis square

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by