• Remix
  • Share
  • New Entry

on 8 Nov 2023
  • 5
  • 32
  • 0
  • 3
  • 226
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)*tan(pi/f); % 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 positions
Marker="*", ... % Set the marker style
Color=[1 0 0.5], ...
MarkerSize=20) % Set the markersize
axis([-1 1 -1 1]) % Set the axis limits
end
Animation
Remix Tree
Load full remix tree