In the image below you see in (1) a triangle and a circle. Given a dedicated point X in that triangle I want clip away everything that is not visible from this point. There’s no problem with removing just the circle with a simple polygon difference algorithm like in (2). But what kind of algorithm can I use to get a polygon like in (3) ?
The Polygon is always simple.
Edit: The circle is just an example. Every simple polygon should be possible.

You can image my needs by taking a look at the image of the game “Commandos – Behind enemy lines”:

This is the basic idea.
I’m assuming a problem a few more general, but it will be a lot easier to adapt it to your problem: given a
plancontaining all the shapes, a point and a set of geometrical shapes, we want to remove from the plan the area not visible from that point.What we want to do is to get, for each shape, it’s
starting_polarandending_polarpoints, that are the 2 points with the minimum and maximum polar angle belonging to the shape.Now we’ll remove from the
planthe shape and we’ll remove thequadrilateralformed by the points:starting_polar,ending_polar, and the intersections between the 2 straight lines(x, starting_polar)and(x, ending_polar)and the boundaries of theplan.In your case the plan will simply be the
triangle.