• Remix
  • Share
  • New Entry

on 24 Nov 2023
  • 11
  • 86
  • 0
  • 3
  • 487
drawframe(1);
Write your drawframe function below
function drawframe(f)
str = {'Matlab 4ever 40 going' };
axes('Position',[0 0 1 1]);
pbaspect([3 1 1]);
text(0,.25,str,'FontSize',8+f/100,'FontName','Lucida Calligraphy',...
'BackgroundColor','#da4','Margin',350);
g=getframe;
% Create the ring geometry
[theta, phi] = meshgrid(linspace(.6,-1.4,100),linspace(.5,2.5,40));
X = (1-(min(cospi(phi),0)*.2)).*cospi(theta);
Y = (1-(min(cospi(phi),0)*.2)).*sinpi(theta);
Z = -sinpi(phi)*.3;
% Draw
surf(X,Y,Z,g.cdata,'FaceColor','texture','EdgeColor','none');
axis off equal
lighting gouraud
material([.6 .9 .9 5 .3])
camlight
end
Animation
Remix Tree