How to adjust edge line spacing using fsurf
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi friends
I would like to ask how to adjust the spacing of edge lines in 'fsurf' function. I will attch my code down here. Hope a hero can pop up and save my day:).
%% numerical parameters
e=0.5625;
fc=64.1741;
ft=64.1741/26.29;
m=3*(fc^2-ft^2)/fc/ft*e/(e+1);
%% variable identification
r = @(theta) (4*(1-e^2)*(cos(theta)).^2+(2*e-1)^2)./(2*(1-e^2)*cos(theta)+(2*e-1)*(4*(1-e^2)*(cos(theta)).^2+5*e^2-4*e).^0.5);
I1 = @(tao,theta) (1-1.5*(tao/fc).^2-m*(tao/fc)/sqrt(6)*r(theta))/m*sqrt(3)*fc;
funx = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta+2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
funy = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-1/3*pi)+I1(tao,theta)/sqrt(3));
funz = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
h(1)=fsurf(funx,funy,funz,[0 300 -pi/3 pi/3]);
hold on
h(2)=fsurf(funy,funz,funx,[0 300 -pi/3 pi/3]);
hold on
h(3)=fsurf(funz,funx,funy,[0 300 -pi/3 pi/3]);
set(h,'edgecolor','k');
set(h,'facecolor','none');
set(h,'FaceAlpha',0.5);
grid off
댓글 수: 0
채택된 답변
KSSV
2021년 8월 9일
PRoceed like this:
clc; clear all ;
%% numerical parameters
e=0.5625;
fc=64.1741;
ft=64.1741/26.29;
m=3*(fc^2-ft^2)/fc/ft*e/(e+1);
%% variable identification
r = @(theta) (4*(1-e^2)*(cos(theta)).^2+(2*e-1)^2)./(2*(1-e^2)*cos(theta)+(2*e-1)*(4*(1-e^2)*(cos(theta)).^2+5*e^2-4*e).^0.5);
I1 = @(tao,theta) (1-1.5*(tao/fc).^2-m*(tao/fc)/sqrt(6)*r(theta))/m*sqrt(3)*fc;
funx = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta+2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
funy = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-1/3*pi)+I1(tao,theta)/sqrt(3));
funz = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
m = 100 ; n = 100 ;
tao = linspace(0,300,m) ;
theta = linspace(-pi/3,+pi/3,n) ;
[tao,theta] = meshgrid(tao,theta) ;
% h(1)=fsurf(funx,funy,funz,[0 300 -pi/3 pi/3]);
% hold on
% h(2)=fsurf(funy,funz,funx,[0 300 -pi/3 pi/3]);
% hold on
% h(3)=fsurf(funz,funx,funy,[0 300 -pi/3 pi/3]);
figure
hold on
h(1)=surf(funx(tao,theta),funy(tao,theta),funz(tao,theta)) ;
h(2)=surf(funy(tao,theta),funz(tao,theta),funx(tao,theta)) ;
h(3)=surf(funz(tao,theta),funx(tao,theta),funy(tao,theta));
set(h,'edgecolor','k');
set(h,'facecolor','none');
set(h,'FaceAlpha',0.5);
grid off
추가 답변 (1개)
Walter Roberson
2021년 8월 9일
You can set the MeshDensity parameter of your h handles. https://www.mathworks.com/help/matlab/ref/matlab.graphics.function.parameterizedfunctionsurface-properties.html#bvfwdd7_sep_shared-MeshDensity
참고 항목
카테고리
Help Center 및 File Exchange에서 Fit Postprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!