Exploring Analyic Geometry with Mathematica® |
|||||
| Home | Contents | Commands | Packages | Explorations | Reference |
| Tour | Lines | Circles | Conics | Analysis | Tangents |
Circle Tangent to Three Lines
tancir5.html
Exploration
Show that the radii of the four circles tangent to the lines x=0, y=0 and A x+B y+C=0, are given by
taking all four combinations of signs and assuming that the lines are normalized. This is a special case of TangentCircles2D[{obj1,obj2,obj3}] where all three of the objects are lines.
Approach
A line a x+b y+c=0 is tangent to a circle
if the equation
holds. Form three equations in three unknowns from this equation and solve.
Initialize
To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.
This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.
<<Descarta2D`
Solution
Solve three equations in three unknowns.
Clear[r,h,k,A1,B1,C1];
ans1=Solve[{r^2==h^2,
r^2==k^2,
r^2==(A1*h+B1*k+C1)^2},
{h,k,r}] /.
{A1^2+B1^2->1};
Extract the value of r.
ans2=Map[(r /. #)&, ans1]
Put all the negative signs in the denominator.
Clear[E1];
ans3=ans2 //. Times[-1,Power[E1_,-1],C1]:>
Times[Power[Expand[-E1],-1],C1]
Change all the minus signs to positive.
ans4=ans3 //. Times[Power[Plus[-1,E1__],-1],C1]:>
Times[Power[Plus[1+E1],-1],-C1]
Take the absolute value and return only the unique terms.
Union[Abs[ans4]]