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.

![Image #1](https://i.stack.imgur.com/J9y0c.png)

You can image my needs by taking a look at the image of the game "Commandos - Behind enemy lines": 

![Image #2](https://i.stack.imgur.com/wsRFh.jpg)