Draw A Reuleaux Triangle! The Reuleaux triangle is the shape formed by the intersection of three circles, with each circle passing through the others' centers. Regardless of rotation, a Reuleaux triangle's width will always equal the radius of the circles:



Image: Wolfram MathWorld

Write a program that takes a width r as input and displays a Reuleaux triangle of that width (in pixels).

You must display the shape in isolation, i.e. solid-filled, un-stroked, and over a solid-filled background.

code-golf - Shortest program in bytes wins.
JavaScript + HTML, 164 158 + 13 = 171 bytes



w=+prompt(f=(x,y)=&gt;x*x+y*y&lt;w*w);C.width=C.height=w*2;for(y=-w;++y&lt;w;)for(x=-w;++x&lt;w;)f(x,y)&amp;f(w-x,y)&amp;f(w/2-x,y-w*.866)&amp;&amp;C.getContext`2d`.fillRect(x+w,y+w,1,1)
&lt;canvas id=C&gt;




I don't know why I enjoy answering these mathy drawing challenges with &lt;canvas&gt; so much...