Point cloud and lighting effects

7 ビュー (過去 30 日間)
Richard
Richard 2017 年 10 月 7 日
編集済み: Cedric 2017 年 10 月 14 日
I'm displaying a half a dozen point clouds, and would like to add some "effects", eg lighting, etc. to give some depth to the figure. But, I don't seem to be able to get any lighting to reflect off the point cloud. Is there any way to do that? The figure seems "flat" without some sort of shadow effect.
Thanks Rick
  2 件のコメント
Abhi Sundararaman
Abhi Sundararaman 2017 年 10 月 10 日
There's a light function
However, it says that lighting only affects patches and surfaces. If you mapped your point cloud onto a surface or a patch, I suppose you could also use the above function.
Another thing you could do is, if the point clouds are being displayed as a scattered set of points in 3d, you could plot the same points again but zero one of the components of X,Y, and Z and plot those points in black. This would fake a "shadow" effect (for example if you zeroed Z).
Cedric
Cedric 2017 年 10 月 10 日
編集済み: Cedric 2017 年 10 月 14 日
And here is a pretty scary alternative ..
pts = rand( 20, 3 ) * 10 ;
plot3( pts(:,1), pts(:,2), pts(:,3), 'r.', 'MarkerSize', 15 ) ;
hold on ; grid on ;
R = @(ry,rz) [cos(ry) -sin(ry) 0; sin(ry) cos(ry) 0; 0 0 1] * ...
[cos(rz) 0 sin(rz); 0 1 0; -sin(rz) 0 cos(rz)] ;
p = [zeros(1,8); 0,0.5,0.2,0.6,0,0.1,0,0; 0,1,1,2,2,1,1,0] ;
for k = 1 : 10
rts_p = R(rand-0.5,rand-0.5)*(rand+0.5)*eye(3)*p+rand(3,1).*max(pts).' ;
fill3(rts_p(1,:),rts_p(2,:),rts_p(3,:), 'y') ;
end

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by