Using TikZ, how can I fill in an angle of a given polygon with a colored arc? For example, given the triangle

`\filldraw[fill=yellow, draw=black] (10,0) -- (-2,9) -- (4,-3) -- (10,0);`

I'd like a blue arc of radius 1 centered on (10,0) sweeping out the angle bounded by the sides of the triangle.

**Edit:** I forgot an important part of my question, which (I think) makes the links provided in the comments insufficient.

How can I fill only *half* the angle with a shaded arc?

## Best Answer

Here is something that gets the job done using basic tikz commands. One of the experts will probably be able to make something nice of it. One major problem is the limitations on number size in tikz computations. The triangle you asked about has dimensions that make the computations too big for tikz to handle properly (pstricks wouldn't have that problem), that is why I used another triangle.

Once the coordinates for the corners are given, the angles are computed automatically, using the let operation. The code is

and the result is

To actually get a (half-)shaded arc, replace the draw command by the following code

With this code, the result is

Another modification of the code, that does not use cosine and arccosine is