• Remix
  • Share
  • New Entry

on 24 Oct 2024
  • 24
  • 95
  • 0
  • 1
  • 1831
Cite your audio source here (if applicable): 《圣诞结》陈奕迅
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent Ll S1 S2 H1 H2
if f==1
set(gcf,'Color',[0,9,33]/255);
set(gca,'Position',[0,-1/6,1,1+1/3],...
'XLim',[-5,5],'YLim',[-5,5],'ZLim',[-3,14],'Color',[0,9,33]/255,...
'XColor','none','YColor','none','ZColor','none','DataAspectRatio',[1,1,1.2]);
hold on; view(-47.5,33);
XMT = @(h,r,a,z) deal((h-z)./h.*r.*cos(a.*z), (h-z)./h.*r.*sin(a.*z), z);
OFS = @(x,y,z,p) deal(x+rand(size(x)).*p-p/2, y+rand(size(y)).*p-p/2, z+rand(size(z)).*p-p/2);
h = 10.05;
r = h/(1+sqrt(5));
[X,Y,Z] = XMT(h,r,100*pi,linspace(0,1,200)*h);
plot3(X,Y,Z,'Color',[76,103,86,250]./255,'LineWidth',1)
[X,Y,Z] = XMT(h,r,90*pi,linspace(0,1,50)*h);
[X,Y,Z] = OFS(X,Y,Z,.1);
F='MarkerFaceAlpha';E='MarkerEdgeAlpha';
scatter3(X,Y,Z,20,[213,194,100]./255,'filled',F,.9,E,.9)
scatter3(X,Y,Z,150,[213,194,100]./255,'filled',F,.2,E,.2)
[X,Y,Z] = XMT(h,r,150*pi,linspace(0,1,50)*h);
[X,Y,Z] = OFS(X,Y,Z,.1);
scatter3(X,Y,Z,20,[114,146,184]./255,'filled',F,.9,E,.9)
scatter3(X,Y,Z,150,[114,146,184]./255,'filled',F,.2,E,.2)
plot3(0,0,10.5,'p', 'MarkerSize',25,'MarkerFaceColor',[255,223,153]/255,'MarkerEdgeColor','none','LineWidth', 1);
Ll = scatter3(0,0,10.5,8000,'o','MarkerFaceColor','w','MarkerEdgeColor','none',F,.1);
[X,Y]=meshgrid(linspace(-6,6,60));
Z=cos(hypot(X,Y).*5)./2-2; [X,Y,Z] = OFS(X,Y,Z,.1);
scatter3(X,Y,Z,3,'o','filled','CData',[91,131,253]./255,...
'MarkerFaceAlpha',.4,'MarkerEdgeColor','none');
S1=rand(120,3);
S1(:,1:2)=S1(:,1:2).*16-8;
S1(:,3)=S1(:,3).*20;
S2=rand(150,3);
S2(:,1:2)=S2(:,1:2).*16-8;
S2(:,3)=S2(:,3).*20;
H1=plot3(S1(:,1),S1(:,2),S1(:,3),'*','Color',[.8,.8,.8]);
H2=plot3(S2(:,1),S2(:,2),S2(:,3),'.','Color',[.6,.6,.6]);
else
Ll.SizeData=8000+sin(f/5).*1600;
S1(:,3)=S1(:,3)-.05;S2(:,3)=S2(:,3)-.03;
S1(S1(:,3)<0,3)=S1(S1(:,3)<0,3)+20;
S2(S2(:,3)<0,3)=S2(S2(:,3)<0,3)+20;
H1.XData=S1(:,1);H1.YData=S1(:,2);H1.ZData=S1(:,3);
H2.XData=S2(:,1);H2.YData=S2(:,2);H2.ZData=S2(:,3);
view([f/96*360,33]);
end
end
Movie
Audio
Remix Tree