• Remix
  • Share
  • New Entry

  • Sidharth

  • /
  • tesla cyber truck in the snow... rip

on 3 Dec 2023
  • 7
  • 11
  • 0
  • 0
  • 993
function drawframe(f)
clf()
set(gcf, 'Color', [0, 0, 0.5]);
truckVertices = [0, -1, 0;2, -1, 0;2, 1, 0;0, 1, 0;0, -1, 0.5;1.5, -1, 1.5;1.5, 1, 1.5;0, 1, 0.5];
truckFaces = [1, 2, 6, 5; 2, 3, 7, 6; 3, 4, 8, 7; 4, 1, 5, 8; 5, 6, 7, 8];
truckPatch = patch('Vertices',truckVertices, 'Faces',truckFaces,'FaceColor',[0.75,0.75, 0.75]);
hold on;
wheelWidth = 0.2;
wheelRadius = 0.25;
frontWheelCenter = [0.5, -1-wheelWidth/2, 0];
rearWheelCenter = [1.5, -1-wheelWidth/2, 0];
line([frontWheelCenter(1)-wheelRadius, frontWheelCenter(1)+wheelRadius], [frontWheelCenter(2), frontWheelCenter(2)], [0, 0], 'Color', 'k', 'LineWidth', 5);
line([rearWheelCenter(1)-wheelRadius, rearWheelCenter(1)+wheelRadius], [rearWheelCenter(2), rearWheelCenter(2)], [0, 0], 'Color', 'k', 'LineWidth', 5);
rng(f);
snowX = rand(100, 1) * 6 - 3;
snowY = rand(100, 1) * 6 - 3;
snowZ = rand(100, 1) * 2;
scatter3(snowX, snowY, snowZ, 'w');
axis equal;
axis([-3 3 -3 3 -1 3]);
set(gca, 'visible', 'off', 'clipping', 'off');
view(90, 0);
camorbit(360/48*(f-1), 0, 'data', [0 0 1]);
hold off;
end
Animation
Remix Tree