打印

matlab--灯光定位

[复制链接]
183|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
cooldog123pp|  楼主 | 2023-10-27 19:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
function shili25
h0=figure('toolbar','none',...
    'position',[200 150 450 250],...
    'name','实例25');
vert=[1 1 1;1 2 1;
    2 2 1;2 1 1;
    1 1 2;1 2 2;
    2 2 2;2 1 2];
fac=[1 2 3 4;2 6 7 3;
    4 3 7 8;1 5 8 4;
    1 2 6 5;5 6 7 8];
grid off
sphere(36)
h=findobj('type','surface');
set(h,'facelighting','phong',...
    'facecolor',...
    'interp',...
    'edgecolor',[0.4 0.4 0.4],...
    'backfacelighting',...
    'lit')
hold on
patch('faces',fac,'vertices',vert,...
    'facecolor','y');
light('position',[1 3 2]);
light('position',[-3 -1 3]);
material shiny
axis vis3d off
hold off


使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1592

主题

5839

帖子

29

粉丝