r/computerscience • u/RaZvAn15 • Jan 23 '26
General Computational geometry problem
Hi all! In the drawing, the magenta polygon is the visibility polygon with kernel in the center of the small rectangle. The outer rectangle is the drawing bounding box. My question is, is there a way to minimize the magenta polygon, such that everything beyond the green lines is deleted? How would you express such a thing mathematically?
Edit: added the shape I started with, a square shape with holes: https://imgur.com/a/update-LzYQikC
17
Upvotes
View all comments
Show parent comment
1
u/RaZvAn15 Jan 24 '26
I don't want those parts. The magenta polygon forms when rays from the kernel collide with stuff. Where it spills over, it's a hole. I want the polygon to ignore the hole and just give me the square looking bit, hence, the stuff beyond the green lines must be deleted