# Placing a cone in a circle

I am trying to make a neat charting app, yet I am having dificulty with some of the math. That's why I'm here!

I have a "pie slice" at a specific angle. I don't want the slice to just be a simple little pie-slice, no, I want to make it a cone shape!

Where do I place the circular cap? If I draw a triangle around my "pie-slice", I can see that the circle at the end must be tangent to all sides of the triangle. Whats the radius of that circle? Where's the center point? What are the points which are tangent to the "triangle"?

The variables R1, @1 (highlighted in blue), and @2 (highlighted in green) are known, but how could I find R2, P1, P2, P3, and @3 (highlighted in red)?

Thanks everybody!

• You can neglect $\theta_1$ for the calculations and apply a rotation about $\theta_1 - \frac{\theta_2}2$ from the symmetric case where $\theta_1 = -\frac{\theta_2}2$ – AlexR Feb 2 '15 at 20:24

You are trying to find the incircle of the equilateral triangle with side lengths $R_1$ and enclosed angle $\theta_2$.
The missing side will have length $l = 2\sin(\frac{\theta_2}2) R_1$.
For instance the radius $R_2$ is given by $$s := R_1 + \frac l2 = R_1(2 + \sin(\frac{\theta_2}2))\\ R_2 = \sqrt{\frac{(s-R_1)^2(s-2\sin\frac{\theta_2}2 R_1)}{s}} = R_1 \sqrt{\frac{(1-\sin\frac{\theta_2}2)^3}{1+\sin\frac{\theta_2}2}}$$ If you label the vertices of the triangle with $M, Q_1$ and $Q_2$, $$P_3 = \frac{R_1 (Q_1 + Q_2) + l M}{2R_1 + l}$$
• Wait... I might sound dumb for asking, but is @3 in my diagram equal to (PI / 2) - @2? And sorry for not having the tools or "know-how" to write my equations out pretty like you guys do. How do you do that actually? – WebWanderer Feb 12 '15 at 15:59
• I'm sorry, but I am quite lost by what the values of M, Q1, and Q2 are supposed to be. Could you explain? – WebWanderer Feb 20 '15 at 15:41
• $M$ is the center of the circle and $Q_1, Q_2$ lie on the intersection of the circle with the beams $\overline{MP_1}, \overline{MP_2}$ respectively. – AlexR Feb 20 '15 at 15:57