Solid with sections as squares on a circle

Опубликовано: 01 Июнь 2026
на канале: Atul Roy
128
2

For the classes of Atul Roy
MATLAB codes are below
syms x y z t
f(x,y,z)=x^2+y^2-4
fimplicit3(f==0,[-5 5 -5 5 0 .01])
axis([-5 5 -5 5 0 5])
hold on
g(x,y,z)=x-1
fimplicit3(g==0,[1 1.001 -sqrt(3) sqrt(3) 0 2*sqrt(3)])
axis equal

byX = .05;
xl = (-2 + byX):byX:(2 - byX);
h= symfun(x,[x y z]);
for x0 = xl
x1 = x0 + .001;
z0 = sqrt(4 - x0^2);
fimplicit3(h==x0, [x0-.001 x0+.001 -z0 z0 0 2 * z0])
end
fplot3(t,sqrt(4-t^2),2*sqrt(4-t^2),[-2 2],"LineWidth",5,'color','m')
fplot3(t,-sqrt(4-t^2),2*sqrt(4-t^2),[-2 2],"LineWidth",5,'Color','m')