'How can I use Python and PIL to draw a shape that would simulate how light/shadow is cast around shapes/objects from a point in a (2D) image?
What I have is a black and white image of shapes, e.g. shapes.
And I would like to be able to, for any given point within the (white/valid portion) image, put a circle representing a radius of light cast from a point, e.g. points A & B and radii A & B.
From there, I would like to generate a shape/mask, that correctly displays where the light would be and where shadows would be cast, e.g. cast.
Finally, I would like to create a final mask of this shape, e.g. final.
The initial shape layouts, the points, and the 'light' radii for each point would all be variable.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
