2

I would like to draw a quadrilateral inscribed within a circle. How can I construct this figure, taking into account arbitrary (specified) side lengths, while still ensuring that the vertices of the quadrilateral lie on the circle?

Oleksandr R.
  • 23,023
  • 4
  • 87
  • 125
user5955
  • 41
  • 5

1 Answers1

7

I hope I understood your question correctly. When you place your figure at {0,0}, meaning the center of the circle and the center of the rectangle is there, you don't need to calculate very much. Indeed, everything is then fixed by exactly one point p defining a corner of the rectangle and the radius of the circle.

A dynamic version of your graphics can be written down in only a few lines of code

Manipulate[
 Graphics[{FaceForm[None], EdgeForm[Thick], Rectangle[-p, p],
   Thick, Red, Circle[{0, 0}, Norm[p]]}, PlotRange -> {{-2, 2}, {-2, 2}}],
 {{p, {1, 1}}, Locator}
]

Mathematica graphics

halirutan
  • 112,764
  • 7
  • 263
  • 474