How can I extract lighting information from a face in a patch object?

1 view (last 30 days)
1) I create a 3D matrix represented by 10's and 0's and say make it a cube. Then I can plot the cube using something like PATCH_array3D to get a patch representation of the voxel set.
2) I insert light source at say light('Position', [0 0 1], 'Style', 'infinite');
3) I edit the properties of my patch object such that Lighting.BackFaceLighting is 'unlit'.
Now I have an illuminated patch object. My question is: Is there a way to extract which faces are lit up from the properties of the patch object? I'm guessing it has something to do with Data.VertexNormals, but I don't understand what data is contained there.
If you need to see a little code to understand what I'm talking about, I can provide this, but I think my question is fairly general.
  1 Comment
Shurui Zhang
Shurui Zhang on 16 May 2019
Hi Alex,
I came across the same question here, where I need to extracted plotted face patch data with different lighting conditions. The "light" or "lightangle" command after plot seem to be only a post-processing visualization step. I wonder if you have solved this problem and could probably share with me?
Thanks!
Shurui

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!