This JSTS example (in javascript) shows how to intersect two polygons.
https://github.com/bjornharrtell/jsts/blob/master/examples/overlay.html
In order to modify the example to make one of them into a circle, use this snippet:
// this returns a JSTS polygon circle approximation with provided center and radius
function pointJSTS(center,radius){
var point = new jsts.geom.Point(center);
return point.buffer(radius);
}
// ....
// insert this into the example above at line 17
b = pointJSTS({x:10,y:20}, 40);
Further modification to the example to make the first polygon into a triangle is trivial.