• Remix
  • Share
  • New Entry

on 6 Nov 2023
  • 3
  • 23
  • 1
  • 0
  • 196
drawframe(36);
Write your drawframe function below
function drawframe(f)
if f <= 12
numPoints = f;
elseif f<36
numPoints=12;
else
numPoints = (48-f);
end
t = f:-1:(f-numPoints+1);
x = cos(pi*(t-24)/24); % Calculate the x positions of the markers based on the frame number and the vector t
y = sin(pi*(t-24)/24); % Calculate the y positions of the markers based on the frame number and the vector t
plot(x,y, ... % Plot the markers at the calculated positions
Marker=".", ... % Set the marker style to a dot
MarkerSize=25) % Set the marker size to 20
axis([-1 1 -1 1]) % Set the axis limits
end
Animation
Remix Tree