• Remix
  • Share
  • New Entry

on 15 Oct 2024
  • 11
  • 69
  • 0
  • 0
  • 845
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function contestEntry()
totalFrames = 96;
for frameNum = 1:totalFrames
drawframe(frameNum);
end
end
function drawframe(frameNum)
% Parameters for dynamic waveforms and patterns
numWaves = 7; % Number of oscillations
radius = 1; % Maximum radius of the wave
amplitude = 0.4; % Amplitude of the oscillation
theta = linspace(0, 2*pi, 500); % Angular coordinates for plotting
t = frameNum*0.2; % Time factor for the oscillation
% Compute outer wave radial distance
r_outer = radius + amplitude * sin(numWaves * theta - t);
x_outer = r_outer .* cos(theta);
y_outer = r_outer .* sin(theta);
% Compute inner wave radial distance
r_inner = radius/2 + amplitude * sin(numWaves * theta + t);
x_inner = r_inner .* cos(theta);
y_inner = r_inner .* sin(theta);
clf;
% Plot outer and inner waves
plot(x_outer, y_outer, 'LineWidth', 1.5, 'Color', [0.9, 0.0, 0.5]);
hold on;
plot(x_inner, y_inner, 'LineWidth', 1.5, 'Color', [0.2, 0.6, 0.7]);
% Dynamic plot adjustments
axis([-1.5 1.5 -1.5 1.5]);
set(gca,'Color',[0.99,0.9,0.4]);
% Additional visual effects (rotating stars)
numStars = 21;
for k = 1:numStars
angleShift = t + k*pi/numStars;
starRadius = 0.3 + 0.3*cos(angleShift);
rectangle('Position', [-starRadius, -starRadius, 2*starRadius, 2*starRadius], 'Curvature', [1, 1], 'EdgeColor', [0.3 0.2 0.3], 'LineWidth', 0.5);
end
drawnow;
end
Movie
Audio

This submission does not have audio.

Remix Tree