Cell[CellGroupData[{Cell[BoxData[ RowBox[{"Manipulate", "[", " ", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"c1", ",", "c2", ",", "r1", ",", "r2", ",", "s"}], "}"}], ",", " ", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Union", "[", "pts", "]"}], "]"}], "===", "1"}], ",", RowBox[{"pts", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", ".1"}], ",", ".1"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "]"}], "+", "#"}], "&"}], ")"}], "/@", "pts"}]}]}], "]"}], ";", " ", RowBox[{ RowBox[{"{", RowBox[{"c1", ",", "r1", ",", "c2", ",", "r2"}], "}"}], "=", RowBox[{"{", RowBox[{ RowBox[{"pts", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Norm", "[", RowBox[{ RowBox[{"pts", "[", RowBox[{"[", "2", "]"}], "]"}], "-", RowBox[{"pts", "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}], ",", RowBox[{"pts", "[", RowBox[{"[", "3", "]"}], "]"}], ",", RowBox[{"Norm", "[", RowBox[{ RowBox[{"pts", "[", RowBox[{"[", "4", "]"}], "]"}], "-", RowBox[{"pts", "[", RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}], "}"}]}], ";", " ", RowBox[{"s", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Solve", "[", RowBox[{"{", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"Norm", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "-", "c1"}], "]"}], "2"], "==", SuperscriptBox[ RowBox[{"(", RowBox[{"r", "+", RowBox[{"i", " ", "r1"}]}], ")"}], "2"]}], ",", RowBox[{ SuperscriptBox[ RowBox[{"Norm", "[", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "-", "c2"}], "]"}], "2"], "==", SuperscriptBox[ RowBox[{"(", RowBox[{"r", "+", RowBox[{"j", " ", "r2"}]}], ")"}], "2"]}]}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"-", "1"}], ",", "1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"-", "1"}], ",", "1", ",", "2"}], "}"}]}], "]"}]}], ";", " ", RowBox[{"s", "=", RowBox[{"Select", "[", RowBox[{ RowBox[{"Cases", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], ",", "r"}], "}"}], "/.", "s"}], ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"_Real", ",", "_Real"}], "}"}], ",", "_Real"}], "}"}]}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Last", "[", "#", "]"}], ">", "0"}], "&"}]}], "]"}]}], ";", " ", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "0.3", "]"}], ",", RowBox[{"EdgeForm", "[", "Thick", "]"}], ",", "Orange", ",", RowBox[{"Disk", "[", RowBox[{"c1", ",", "r1"}], "]"}], ",", RowBox[{"Disk", "[", RowBox[{"c2", ",", "r2"}], "]"}], ",", "Purple", ",", RowBox[{ RowBox[{ RowBox[{"Disk", "[", RowBox[{ RowBox[{"First", "[", "#", "]"}], ",", RowBox[{"Last", "[", "#", "]"}]}], "]"}], "&"}], "/@", "s"}]}], "}"}], ",", RowBox[{"PlotRange", "->", "4"}], ",", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"400", ",", "400"}], "}"}]}]}], "]"}]}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"pts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1.5", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "1"}], "}"}]}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", RowBox[{"-", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "4"}], "}"}], ",", "Locator"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"r", ",", "0.61", ",", "\"\\""}], "}"}], ",", "0", ",", "2"}], "}"}], ",", RowBox[{"SaveDefinitions", "->", "True"}], ",", RowBox[{"ControllerLinking", "->", "False"}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{{3.4249648208343935`*^9, 3.42496482577183*^9}, { 3.424964857662047*^9, 3.424965013972546*^9}, {3.424965061862558*^9, 3.424965112643158*^9}, {3.4249651481427035`*^9, 3.424965246641443*^9}, {3.4249653276716557`*^9, 3.4249654787790966`*^9}, {3.4249659577573404`*^9, 3.424965983007017*^9}, {3.425047357656883*^9, 3.425047392625185*^9}, {3.425124736600891*^9, 3.4251247687821093`*^9}, {3.425224902620244*^9, 3.4252251006780477`*^9}, 3.760778122589985*^9}, CellID->982559304], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`pts$$ = {{-1, 0}, {-2, 1}, { 1.5, 0}, {3, 1}}, $CellContext`r$$ = 0.61, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`pts$$], {{-1, 0}, {-2, 1}, {1.5, 0}, {3, 1}}}, {-4, -4}, {4, 4}}, {{ Hold[$CellContext`r$$], 0.61, "radius"}, 0, 2}}, Typeset`size$$ = {400., {198., 202.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`pts$24364$$ = {0, 0}, $CellContext`r$24365$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`pts$$ = {{-1, 0}, {-2, 1}, { 1.5, 0}, {3, 1}}, $CellContext`r$$ = 0.61}, "ControllerVariables" :> { Hold[$CellContext`pts$$, $CellContext`pts$24364$$, {0, 0}], Hold[$CellContext`r$$, $CellContext`r$24365$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`c1$, $CellContext`c2$, $CellContext`r1$, \ $CellContext`r2$, $CellContext`s$}, If[Length[ Union[$CellContext`pts$$]] === 1, $CellContext`pts$$ = Map[RandomReal[{-0.1, 0.1}, { 2}] + #& , $CellContext`pts$$]]; {$CellContext`c1$, \ $CellContext`r1$, $CellContext`c2$, $CellContext`r2$} = { Part[$CellContext`pts$$, 1], Norm[ Part[$CellContext`pts$$, 2] - Part[$CellContext`pts$$, 1]], Part[$CellContext`pts$$, 3], Norm[ Part[$CellContext`pts$$, 4] - Part[$CellContext`pts$$, 3]]}; $CellContext`s$ = Table[ Solve[{Norm[{$CellContext`x, $CellContext`y} - \ $CellContext`c1$]^2 == ($CellContext`r$$ + $CellContext`i \ $CellContext`r1$)^2, Norm[{$CellContext`x, $CellContext`y} - \ $CellContext`c2$]^2 == ($CellContext`r$$ + $CellContext`j \ $CellContext`r2$)^2}], {$CellContext`i, -1, 1, 2}, {$CellContext`j, -1, 1, 2}]; $CellContext`s$ = Select[ Cases[ Flatten[ ReplaceAll[{{$CellContext`x, $CellContext`y}, \ $CellContext`r$$}, $CellContext`s$], 2], {{ Blank[Real], Blank[Real]}, Blank[Real]}], Last[#] > 0& ]; Graphics[{ Opacity[0.3], EdgeForm[Thick], Orange, Disk[$CellContext`c1$, $CellContext`r1$], Disk[$CellContext`c2$, $CellContext`r2$], Purple, Map[Disk[ First[#], Last[#]]& , $CellContext`s$]}, PlotRange -> 4, ImageSize -> {400, 400}]], "Specifications" :> {{{$CellContext`pts$$, {{-1, 0}, {-2, 1}, { 1.5, 0}, {3, 1}}}, {-4, -4}, {4, 4}, ControlType -> Locator}, {{$CellContext`r$$, 0.61, "radius"}, 0, 2}}, "Options" :> {ControllerLinking -> False}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{451., {246., 252.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>({$CellContext`c1 = {-1, 0}, $CellContext`c2 = { 1.5, 0}, $CellContext`r1 = Sqrt[2], $CellContext`r2 = 1.8027756377319946`, $CellContext`s = {{{-0.2959976016525351, \ -3.243124501148109}, 1.904442175546425}, {{-0.2959976016525351, 3.243124501148109}, 1.904442175546425}}, Attributes[PlotRange] = {ReadProtected}}; Typeset`initDone$$ = True), SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.7607781225903*^9}, CellID->29871326] }, {2}]]