• Remix
  • Share
  • New Entry

  • Jr

  • /
  • timeless 80s

on 17 Oct 2024
  • 34
  • 276
  • 0
  • 4
  • 1215
Cite your audio source here (if applicable): https://www.youtube.com/watch?v=9GMjH1nR0ds
drawframe(1);
sp =
ParameterizedFunctionSurface with properties: XFunction: 3*cos(theta)*sin(phi) YFunction: 3*sin(phi)*sin(theta) ZFunction: 3*cos(phi) + 6 URange: [0 3.1416] VRange: [1 7.2832] EdgeColor: [0.7529 0.7529 0.7529] LineStyle: '-' FaceColor: 'interp' Use GET to show all properties
c = 1×3
0 0 0
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
p1 =
Surface with properties: EdgeColor: [1 0 1] LineStyle: '-' FaceColor: [0 0 0] FaceLighting: 'flat' FaceAlpha: 1 XData: [21x21 double] YData: [21x21 double] ZData: [21x21 double] CData: [21x21 double] Use GET to show all properties
p2 =
Surface with properties: EdgeColor: 'none' LineStyle: '-' FaceColor: [0 0 0] FaceLighting: 'flat' FaceAlpha: 1 XData: [21x21 double] YData: [21x21 double] ZData: [21x21 double] CData: [21x21 double] Use GET to show all properties
p3 =
Surface with properties: EdgeColor: 'none' LineStyle: '-' FaceColor: [0 0 0] FaceLighting: 'flat' FaceAlpha: 1 XData: [21x21 double] YData: [21x21 double] ZData: [21x21 double] CData: [21x21 double] Use GET to show all properties
S = 1×20
-1 6 -5 -1 0 -8 5 5 9 -7 3 3 -1 -4 5 3 -8 7 -9 -10
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
T = 1×20
7 2 8 1 4 -3 -2 -4 1 1 9 0 2 0 -3 -9 1 9 7 2
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
U = 1×20
6 -3 1 6 1 -3 -10 7 -4 1 -4 -1 -9 3 -8 -1 -7 10 2 4
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
Write your drawframe function below
%this is a remake of my 2023 animation called "timeless 80s"
%https://www.mathworks.com/matlabcentral/communitycontests/contests/6/entries/15779
function drawframe(f)
figure('Color','k');
%Creating the Disco ball
syms phi theta
r = 3;
x = r*sin(phi)*cos(theta);
y = r*sin(phi)*sin(theta);
z = r*cos(phi);
sp = fsurf(x,y,z+6,[0 pi f 2*pi+f], 'edgecolor', [192,192,192]/255)
hold on;
%Black Walls
[u v] = meshgrid(-10:1:10); % Generate x and y data
w = zeros(size(u, 2)); % Generate z data
c = [0 0 0]
p1 = surf(u, v, w-10, FaceC=c,EdgeC='m')
p2 = surf(w+10, u, v, FaceC=c,EdgeC='n')
p3 = surf(v, w+10, u, FaceC=c,EdgeC='n')
%Lights, many lights
if 48>=f
light("Style","local","Position",[8 8 -30+f*2], 'Color', 'g');
light("Style","local","Position",[8 8 30-f*2], 'Color', 'y');
light("Style","local","Position",[f 10 -5], 'Color', 'm');
light("Style","local","Position",[10 f -5], 'Color', 'm');
light("Style","local","Position",[30-f*2 -30+f*2 -5], 'Color', 'w');
else
light("Style","local","Position",[8 8 163-f*2], 'Color', 'g');
light("Style","local","Position",[8 8 -163+f*2], 'Color', 'y');
light("Style","local","Position",[97-f 10 -5], 'Color', 'm');
light("Style","local","Position",[10 97-f -5], 'Color', 'm');
light("Style","local","Position",[-163+f*2 163-f*2 -5], 'Color', 'w');
end
S = randi([-10, 10], 1, 20)
T = randi([-10, 10], 1, 20)
U = randi([-10, 10], 1, 20)
l2 = scatter3(U,T,S,"o",'MarkerFaceColor',[1, 1, 0],'MarkerEdgeColor','n', 'MarkerFaceAlpha',.3);
axis equal off
camzoom(2)
view([-37.5 20])
colormap(white);
end
Movie
Audio
Remix Tree