I have two vectors forming a specific angle that denotes what is "visible", represented as the blue angle in the following picture.
The red angle represents an "occluding angle" that blocks incoming light.
I need to efficiently calculate the violet angle, which represents the percentage of the visible light against the occluding angle, which creates four possible cases depicted as partially occluded (one or two sides) fully occluded or no occlusion at all.
I've failed to find an efficient algorithm to do this very specific task, considering that the blue angle could be as big a just PI, but the occluding angle may be as much as 2PI, placed anywhere inside the circle
Edit: both angles are specified from 4 normalized vectors, it's not strictly needed to work with angles at all, since I just need to know what percentage of the area/angle between the blue vectors is occluded by the red vectors
To determine whether angular segments do intersect and intersection type, you can use approach described in my answers here
a1 and a2 are ends of the first sector, b1 and b2 are ends of the second sector, ma and mb are bisectors, da and db are half-angles:
da = (a2 - a1)/ 2
db = (b2 - b1)/ 2
ma = (a2 + a1)/ 2
mb = (b2 + b1)/ 2
cda = Cos(da)
cdb = Cos(db)
To check whether intersection exists and what kind of intersection takes place, find 4 boolean values
BStartInsideA = (Cos(ma - b1) >= cda)
BEndInsideA = (Cos(ma - b2) >= cda)
AStartInsideB = (Cos(mb - a1) >= cdb)
AEndInsideB = (Cos(mb - a2) >= cdb)
Linked answer discusses also problems of normalization of weird-defined arcs (perhaps not important for your case) and getting of binary code characterizing intersection type (important - in your case it is excluded interval)