Ellipsoid is showing as a sphere

조회 수: 1 (최근 30일)
Kevin Hanekom
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
DGM
DGM 2021년 4월 15일
Looks ellipsoidal to me
Just set
axis equal
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
  댓글 수: 1
Kevin Hanekom
Kevin Hanekom 2021년 4월 15일
You are amazing!! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Volume Visualization에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by