How to draw a patch with different front-face and back-face colors?
3 次查看(过去 30 天)
显示 更早的评论
Consider drawing a patch, say
patch([0 1 1], [0 0 1], [1 2 3], 1).
I want the patch sides to be of different color: say, "red" when I look at its front-face and "blue" when I look at its back side. Is it possible?
Or maybe it's possible to switch on the "back-face culling" in MATLAB?
2 个评论
Agustín Trujillo-Pino
2015-9-4
编辑:Agustín Trujillo-Pino
2015-9-4
You need to create your own callback every time the user moves the mouse to rotate, and in that callback you compute what faces are front-facing or back-facing to the camera, and set the corresponding color for each one.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polygons 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!