1
$\begingroup$

I have:

eu = Exp[I  2 i \[Pi]/n];
m = 3; pts = {Re[eu], Im[eu]} /. n -> m;
circle = {Sin[u], Cos[u]};
center1 = Table[pts, {i, 0, m - 1}]; 
circle1 = Map[(# + circle) &, center1];
ParametricPlot[circle1, {u, 0, 2 \[Pi]}]

which produces this:

enter image description here

Now I want to find the coordinates of the intersection of these circles. I tried:

Solve[circle1[[1]] == (circle1[[2]] /. u -> u + 2 \[Pi] n) && 
n \[Element] Integers && u > 0 && u < 2 \[Pi], {u, n}]

but that did not return an answer.

  • Is Solve[] capable of solving trigonometric problems by specifying the range of the angle as I have done above or should I convert it to the Complex format?
  • When solving 1D equations or solving multiple equations with all the variables from the same domain, we can do Solve[expr,vars,dom]. How can we specify different domains for different variables? Is it ok to introduce them as additional equations as I have done above?

I am not too sure of the mathematics of my approach so I have also asked it on Maths stack exchange.

$\endgroup$

2 Answers 2

4
$\begingroup$

If you want the intersection of all three circles, write the x,y coordinates of all three circles about their centers in center1.

FindInstance[(x - center1[[1, 1]])^2 + (y - center1[[1, 2]])^2 == 1 
   && (x - center1[[2, 1]])^2 + (y - center1[[2, 2]])^2 == 1 
   && (x - center1[[3, 1]])^2 + (y - center1[[3, 2]])^2 == 1, {x, y}, 2]

{{x -> 0, y -> 0}}

To find the intersection between pairs of the circles, take them two at a time

FindInstance[(x - center1[[1, 1]])^2 + (y - center1[[1, 2]])^2 == 1 
  && (x - center1[[2, 1]])^2 + (y - center1[[2, 2]])^2 == 1, {x, y}, 2]
FindInstance[(x - center1[[1, 1]])^2 + (y - center1[[1, 2]])^2 == 1 
  && (x - center1[[3, 1]])^2 + (y - center1[[3, 2]])^2 == 1, {x, y}, 2]
FindInstance[(x - center1[[2, 1]])^2 + (y - center1[[2, 2]])^2 == 1 
  && (x - center1[[3, 1]])^2 + (y - center1[[3, 2]])^2 == 1, {x, y}, 2]

{{x -> 0, y -> 0}, {x -> 1/2, y -> Sqrt[3]/2}}
{{x -> 0, y -> 0}, {x -> 1/2, y -> -(Sqrt[3]/2)}}
{{x -> -1, y -> 0}, {x -> 0, y -> 0}}
$\endgroup$
4
  • $\begingroup$ Thank you, but you are doing it in Cartesian coordinates. I want to be able to do it Polar coordinates, or at least know why I can't. Regardless, would you care to explain the difference in usage of Solve and FindInstance? $\endgroup$
    – Shb
    Commented Dec 21, 2015 at 1:51
  • $\begingroup$ I guess it seems simpler in Cartesian coordinates. It looks like you get pretty much the same thing with Solve as with FindInstance in this case. $\endgroup$
    – bill s
    Commented Dec 21, 2015 at 3:03
  • $\begingroup$ Well this is a general question. Btw, I just realized I can try something like: Solve[Norm[circle1[[j]]] == Norm[circle1[[i]]] && u > 0 && u <= [Pi], u] with i and j pairs of {1,2,3}. It gives the right answer for {1,2} and {3,1} but for {2,3} which should return pi, it gives me pi/2. Any idea why? $\endgroup$
    – Shb
    Commented Dec 21, 2015 at 3:39
  • $\begingroup$ Neat solution! Thank you for sharing. $\endgroup$
    – ktm
    Commented May 23, 2017 at 22:36
1
$\begingroup$
eq = {a, b, c, d} = {2 {Cos[u], Sin[u]}}~Join~circle1;
fun[w_, v_] := (w /. u -> p) /. {ToRules@
    N[Reduce[(w /. u -> p) == (v /. u -> q) && 0 <= p <= 2 Pi && 
       0 <= q <= 2 Pi, {p, q}]]}
pts = Chop[Join @@ fun @@@ Subsets[eq, {2}]]
ParametricPlot[
 Evaluate[{2 {Cos[u], Sin[u]}}~Join~circle1], {u, 0, 2 \[Pi]}, 
 Epilog -> {Red, PointSize[0.02], Point[pts]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.