Ellipsoid is showing as a sphere

6 views (last 30 days)
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 Comments
DGM
DGM on 15 Apr 2021
Looks ellipsoidal to me
Just set
axis equal
Kevin Hanekom
Kevin Hanekom on 15 Apr 2021
Turns out something simple is always better lol, thank you!

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 15 Apr 2021
Try
axis equal
or
axis square

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!