object_draw.m

来自「用MATLAB做的3D图形的变化,这个是范例,希望会帮到大家」· M 代码 · 共 19 行

M
19
字号
function h = object_draw( obj, c )

% h = object_draw( obj, c )
% draw object obj which is in homogeneous coordinates
% c is an optianl parametr which, if supplied, specified the colour of the drawing
% return a handle to the drawing

% get the oridinary cooridinates
img = obj(1:2,:) ./ repmat( obj(3,:), 2,1 );

% draw it
h = plot( img(1,:), img(2,:) );

if nargin == 2
  set(h,'Color',c);
end

return;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?