-
Notifications
You must be signed in to change notification settings - Fork 94
Description
There is a slight inconsistency between the Light mask functions, e.g. cube_mask vs geometry.Box
Calling Box(X,Y,Z) creates a box with sides of length X, Y, and Z respectively.
Calling pvtrace.light.light.cube_mask(X,Y,Z) returns a random coordinate between (-X --> +X,-Y --> +Y, -Z --> +Z) which is a volume equivalent to Box((2X,2Y,2*Z)).
This works well because the Box() is centred on (0,0,0) by default, so the resulting Box() and Light() behave the same when transformations are applied to move and rotate them.
I had at first assumed that the coordinates supplied to Light() behaved exactly like Box() but this was my mistake as the code is clearly commented; I thought I'd flag this potential confusion for other users. I'm not sure whether it needs fixing because changing the behaviour could break existing code.
Perhaps an optional future feature could be added to make a geometry object into a light, or use as a template for a light source?