• Remix
  • Share
  • New Entry

on 17 Nov 2023
  • 13
  • 8
  • 0
  • 0
  • 1040
drawframe(1);
function drawframe(f)
az = interp1([0 48],[0 360],f);
theta = az*pi/180;
k = (sin(theta)+1)/2;
L1 = 40*membrane(1,25);
L2 = rot90(L1,2);
L = k*L1 + (1-k)*L2;
clf
logoFig = gcf;
set(logoFig,Color=[0 0 0])
logoax = axes('CameraPosition', [-193.4013 -265.1546 220.4819],...
'CameraTarget',[26 26 10], ...
'CameraUpVector',[0 0 1], ...
'CameraViewAngle',9.5, ...
'DataAspectRatio', [1 1 .9],...
'Position',[0 0 1 1], ...
'Visible','off', ...
'XLim',[1 51], ...
'YLim',[1 51], ...
'ZLim',[-13 40], ...
'parent',logoFig);
s = surface(L, ...
'EdgeColor','none', ...
'FaceColor',[0.9 0.2 0.2], ...
'FaceLighting','phong', ...
'AmbientStrength',0.3, ...
'DiffuseStrength',0.6, ...
'Clipping','off',...
'BackFaceLighting','lit', ...
'SpecularStrength',1, ...
'SpecularColorReflectance',1, ...
'SpecularExponent',7, ...
'Tag','TheMathWorksLogo', ...
'parent',logoax);
l1 = light('Position',[40 100 20], ...
'Style','local', ...
'Color',[0 0.8 0.8], ...
'parent',logoax);
l2 = light('Position',[.5 -1 .4], ...
'Color',[0.8 0.8 0], ...
'parent',logoax);
% Have logo use camera pan and zoom since limits pan and zoom looks strange
% with CameraTarget set
z = zoom(logoFig);
z.setAxes3DPanAndZoomStyle(logoax,'camera');
view(az,37)
end
Animation
Remix Tree