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
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Volume Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!