matlab--灯光定位

[复制链接]
547|0
 楼主| cooldog123pp 发表于 2023-10-27 19:40 | 显示全部楼层 |阅读模式
  1. function shili25
  2. h0=figure('toolbar','none',...
  3.     'position',[200 150 450 250],...
  4.     'name','实例25');
  5. vert=[1 1 1;1 2 1;
  6.     2 2 1;2 1 1;
  7.     1 1 2;1 2 2;
  8.     2 2 2;2 1 2];
  9. fac=[1 2 3 4;2 6 7 3;
  10.     4 3 7 8;1 5 8 4;
  11.     1 2 6 5;5 6 7 8];
  12. grid off
  13. sphere(36)
  14. h=findobj('type','surface');
  15. set(h,'facelighting','phong',...
  16.     'facecolor',...
  17.     'interp',...
  18.     'edgecolor',[0.4 0.4 0.4],...
  19.     'backfacelighting',...
  20.     'lit')
  21. hold on
  22. patch('faces',fac,'vertices',vert,...
  23.     'facecolor','y');
  24. light('position',[1 3 2]);
  25. light('position',[-3 -1 3]);
  26. material shiny
  27. axis vis3d off
  28. hold off


您需要登录后才可以回帖 登录 | 注册

本版积分规则

2304

主题

7631

帖子

31

粉丝
快速回复 在线客服 返回列表 返回顶部