3
$\begingroup$

I hope to find $4$ points in a circle. The side length constituted by those $4$ points is $1$, $2$, $3$ and $4$ in order. The image would be like this

I think the side length should be proportional to the central angle so I tried the following in Mathematica:

edgesLen = {1, 2, 3, 4};
angle = Accumulate[2 Pi Normalize[edgesLen, Total]];
rad = Sqrt[First[edgesLen]^2/(2 - 2 Cos[First[angle]])];
pts = Catenate[CirclePoints[{rad, #1}, 1] & /@ angle];
Graphics[{Circle[{0, 0}, rad], PointSize[.02], Red, Point[pts], Black,
   Polygon[pts]}, Axes -> True]

I find the result is not right:

RotateRight[Developer`PartitionMap[Apply[N@*EuclideanDistance], pts, 2, 1, 1]]

{1.,1.90211,2.61803,3.07768}

Is there any advice can give?

$\endgroup$
  • $\begingroup$ How can you have five points and only four lengths? Anyway, see this. $\endgroup$ – J. M.'s technical difficulties May 18 '17 at 17:27
  • $\begingroup$ @J.M. Thanks,that is a typo.I have updated that.And If we want to find five points and five length,such as {89, 90, 91, 92, 93}.How to do? $\endgroup$ – yode May 18 '17 at 17:31
  • $\begingroup$ Can you elaborate on what mathematical method you're using, and why you expect it to work? $\endgroup$ – Emilio Pisanty May 18 '17 at 17:37
  • $\begingroup$ @EmilioPisanty I think the length should be proportional to the central angle.It's seem it not right. $\endgroup$ – yode May 18 '17 at 17:40
  • $\begingroup$ The side lengths cannot be proportional to the angle, for simple geometrical reasons, as you can easily convince yourself with cases such as $\theta = \pi/2$ and $\pi$. $\endgroup$ – David G. Stork May 18 '17 at 18:05
2
$\begingroup$

Interesting problem! Solved it slightly differently. Defined angles q1, q2, and q3 and radius rr. Wrote equations...

eqns={1 == 2*rr*Sin[q1/2],
      2 == 2 rr Sin[q2/2],
      3 == 2 rr Sin[q3/2],
      4 == 2 rr Sin[(2 π - q3 - q2 - q1)/2]}
(Reduce[eqns, {q1, q2, q3, rr}] // N) /. {C[1] -> 0, C[2] -> 0, C[3] -> 0}

Messy answer, but picked off for the angles and the radius

 (q1 == 0.504689 && q2 == 1.0457 && q3 == 1.69318 && rr == 2.0026)

Note the radius is not equal to 1. Converting to a set of points and plotting...

 Graphics[{Circle[{0, 0}, radius], Red, PointSize[0.02], Point[pts], 
          Blue, Line[AppendTo[pts, First[pts]]]}]

enter image description here

$\endgroup$
  • $\begingroup$ That's the first way I tried too, but somehow didn't get a solution. (I wonder why.) $\endgroup$ – David G. Stork May 18 '17 at 21:03
5
$\begingroup$

The side lengths certainly are not proportional to the angle.

Assume the circle is of radius 1 and the first point lies at $(1,0)$. Then just write out all the components of the remaining three points and the distances ($a$, $2 a$, $3 a$ and $4 a$ for unknown $a$) and Solve. Select the solution with $a>0$ (#[[7,2] >0) and the $x$ component of point 2 to be negative (#[[2,2]]<0) (or positive, if you wish) to ensure you don't get the trivial solution and to retain only one of the spatially symmetric solutions.

     mysolution = Select[
     Solve[{

(* points lie on unit circle *)

        x2x^2 + x2y^2 == 1, 
        x3x^2 + x3y^2 == 1, 
        x4x^2 + x4y^2 == 1,

(* distances are a, 2a, 3a, 4a *)

        (x2x - 1)^2 + x2y^2 == a^2, 
        (x3x - x2x)^2 + (x3y - x2y)^2 == 4 a^2, 
        (x4x - x3x)^2 + (x4y - x3y)^2 == 9 a^2, 
        (x4x - 1)^2 + x4y^2 == 16 a^2}, 

     {x2x, x2y, x3x, x3y, x4x, x4y, a}],
     #[[7, 2]] > 0 && #[[2, 2]] < 0 &][[1]];

    thepoints = Join[{{1, 0}}, 
    Partition[Drop[mysolution[[All, 2]], -1], 2]]

(*

{{1, 0},

{337/385, (76 Sqrt[6])/385},

{1/49, (20 Sqrt[6])/49},

{-(383/385), -((16 Sqrt[6])/385)}}

*)

  Graphics[{Circle[],
  Red, PointSize[0.02], Point[thepoints],
  Blue, Line[AppendTo[thepoints, First[thepoints]]]}]

enter image description here

In case you need it, the distances are found from:

Last@mysolution

a -> 4 Sqrt[6/385]

$\endgroup$
2
$\begingroup$
w = 2 ArcSin[#/(2 r )] & /@ Range[4];
root = FindRoot[Total@w == 2 Pi, {r, 2}];
radius = r /. root;
pts[alpha_] := 
  radius FoldList[RotationMatrix[#2].#1 &, {Cos[alpha], Sin[alpha]}, 
    Most@w /. root];
txt[angle_] := 
  Text[Framed[Style[EuclideanDistance[##], 20], Background -> White], 
     Mean[{##}]] & @@@ Partition[pts[angle], 2, 1, 1];
Manipulate[
 Graphics[{Circle[{0, 0}, radius], PointSize[0.02], Red, 
   Point[pts[angle]], EdgeForm[Black], FaceForm[None], Black, 
   Polygon[pts[angle]], txt[angle], Dashed, Orange, 
   Line[{{0, 0}, #}] & /@ pts[angle]}, 
  PlotLabel -> Row[{"radius=", radius}]], {angle, 0, 2 Pi}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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