• Remix
  • Share
  • New Entry

on 30 Nov 2023
  • 5
  • 25
  • 0
  • 0
  • 358
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent x y s g
if f==1
[x,y]=cylinder(1,12);
plot(x,y,'py','markers',25,'markerf','y');
axis equal off;
set(gcf,'color','b');
g=getframe(gcf);
g=g.cdata;
s=size(g,1);
[x,y]=meshgrid(1:size(g,2),1:s);
set(gcf,'color','w');
end
surf(x,25*sin((x*2+y+200/3*2*pi/48*f)*.015).*(x/s).^.5,y+50*sin(2*pi*f/48),g(end:-1:1,:,:),'edgec','n');
camlight headlight;
axis equal off;
view([-40 20]);
end
Animation
Remix Tree