How to adjust edge line spacing using fsurf
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
KSSV
on 9 Aug 2021
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
More Answers (1)
Walter Roberson
on 9 Aug 2021
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
See Also
Categories
Find more on Fit Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!