Effacer les filtres
Effacer les filtres

How to draw a patch with different front-face and back-face colors?

4 vues (au cours des 30 derniers jours)
Dmitry
Dmitry le 3 Déc 2013
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 commentaires
Alec Jacobson
Alec Jacobson le 23 Mar 2015
I'd also like to know if this is possible.
Agustín Trujillo-Pino
Agustín Trujillo-Pino le 4 Sep 2015
Modifié(e) : Agustín Trujillo-Pino le 4 Sep 2015
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Tracking and Motion Estimation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by