• Remix
  • Share
  • New Entry

on 8 Oct 2024
  • 25
  • 198
  • 0
  • 1
  • 613
Audio was generated by an oscillator I wrote which is controlled by this minihack script to make sure it is synchronized with the video. See commented out section of pumpspring below.
Pumpspring is adapted from my minihack of same name from last year's contest so I could play around with generating sounds. Since sound generation isn't part of the minihack, I got to comment it out to save characters.
function drawframe(f)
persistent P Srf Zx
spring=sinpi(f/24)+2;
n=300;% Resolution of the sphere
S=10; % Number of spirals
w=.1/spring;% Thickness of the ribbon.
nb=12;% Number of bumps in the punkin
% Theta goes around S times, with n verts per round.
T=linspace(0,S*2,n*S);
T=[T;T];% top and bottom of ribbon
% Phi slowly goes from -.5 to .5 (top+bottom of sphere) with same # verts
% as theta.
P=linspace(-.5+w,.5,3000);
%P=-.5:.0003:.5;
P=[P;P-w];% top and bottom of ribbon, thickness of w.
% Radius of punkin has bumps. R modulates # of bumps.
R=1-(1-mod(T*nb,2)).^2/15;
% Make the surface coordinates
X=cospi(P).*cospi(T);
Y=cospi(P).*sinpi(T);
if f==1
Z=(.8+(0-(P*2).^4)*.2).*sinpi(P);
Zx=max(Z,[],'all');
% Draw
Srf=surf(R.*X,R.*Y,R.*Z,'FaceColor','#f71','EdgeColor','n');
surface(X/12,Y/12,Z/2+.7,'FaceColor','#080','EdgeColor','n');
camlight
lighting g
material([.6 .9 .3 2 .5])
daspect([1 1 1]);
axis([-1 1 -1 1 -3 .5],'off');
set(gca,'pos',[0 0 1 1],'clipping','off');
set(gcf,'color','w');
end
Z2=(.8+(0-(P*2).^4)*.2).*sinpi(P)*spring;
Z2x=max(Z2,[],'all');
set(Srf,'ZData',Z2-diff([Zx Z2x]));
%% Generate a tone:
% Tone is based on how sproinged the pumpkin is.
%springnorm = (spring-1)/2;
% AS is "audio syncrhonizer" object I wrote for this purpose.
%AS.osc.freq = 80-springnorm^4*20;
%AS.osc.volume = springnorm^5;
end
Movie
Audio
Remix Tree