I have two vectors forming a certain angle, which means what is “visible”, represented as a blue corner in the following figure.
The red corner is an "occlusal angle" that blocks incoming light.
I need to efficiently calculate the violet angle, which represents the percentage of visible light versus the occlusal angle, which creates four possible cases that are partially closed (one or two sides) are fully occluded or have no occlusion at all.
I was not able to find an effective algorithm for this very specific task, given that the blue angle can be as large as the PI, but the occlusal angle can be equal to 2PI placed anywhere inside the circle

Edit: both angles are indicated from 4 normalized vectors, this is not strictly necessary for working with angles in general, since I just need to know what percentage of the area / angle between the blue vectors overlaps with red vectors
source
share