Group Abstract Group Abstract

Message Boards Message Boards

0
|
762 Views
|
8 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Solve geometric quantities using GeometricScene

Posted 2 months ago

I constructed the following GeometricScene with parameters {s,r}. The scene consists of a circle of radius r, and an equilateral triangle {a,b,c} inscribed in the circle. s being the length of one side of the triangle. I want to calculate the value of s, dependent on the value of r.

scene=GeometricScene[{{a,b,c,o},{s,r}},{CircleThrough[{a,b,c},o,r],GeometricAssertion[Triangle[{a,b,c}],"Equilateral"],s==TriangleMeasurement[{a,b,c},"Perimeter"]}];
RandomInstance[scene]
s/.%["Quantities"]

It returns 4.41219 as the value of s. I'm guessing behind the scenes, Mathematica chose a value for r and use that value for s. Is there any way to get an analytical solution of s dependent on r?

POSTED BY: Xiangyang Zhou
8 Replies

Eliminate gives necessary conditions, not always sufficient. Try this:

GeometricScene[{{a, b, c, o}, {s, r}}, {CircleThrough[{a, b, c}, o, r],
    GeometricAssertion[Triangle[{a, b, c}], "Equilateral"], 
   s == TriangleMeasurement[{a, b, c}, "Perimeter"], 
   s != 3 Sqrt[3] r}]["Conclusions"]
POSTED BY: Gianluca Gorni
POSTED BY: Ian Ford
POSTED BY: Gianluca Gorni
Posted 2 months ago
POSTED BY: Xiangyang Zhou
Posted 2 months ago

r*Sqrt[3] is a solution of the system returned by Eliminate[Most[eqs], Cases[eqs, _Indexed, All]]. This is what puzzles me, it is a solution to the eqs from the scene, yet it is NOT a solution to the scene itself. The expected solution is 3 Sqrt[3] r.

POSTED BY: Xiangyang Zhou

You can check that s == r*Sqrt[3] is not a solution this way:

sols = Reduce[Most[eqs] && s == r*Sqrt[3]] // Reduce
Implies[sols, r == 0] // Reduce
POSTED BY: Gianluca Gorni

I am no expert, but maybe the culprit is the first equation, that contains three square roots. Perhaps Eliminate transforms it into a polynomial equation, and in doing so it introduces spurious solutions.

POSTED BY: Gianluca Gorni
Posted 2 months ago

This certainly got me to the next step. However, it gives the following solutions,

{{s->0},{s->0},{s->0},{s->0},{s->0},{s->0},{s->-3 SqrtBox["3"] r},{s->-SqrtBox["3"] r},{s->SqrtBox["3"] r},{s->3 SqrtBox["3"] r}} 

What puzzels me is that Sqrt[3]*r is not a solution. If I add that to the scene, Mathematica will have a hard time to find an instance.

scene=GeometricScene[{{a,b,c,o},{s,r}},{CircleThrough[{a,b,c},o,r],GeometricAssertion[Triangle[{a,b,c}],"Equilateral"],s==TriangleMeasurement[{a,b,c},"Perimeter"],s==Sqrt[3] r}];
RandomInstance[scene]

Was it a bug or something's wrong in my scene? Thank you!

POSTED BY: Xiangyang Zhou
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard