How to plot something like this? I need only the triangle and the 3 circles green. Thank you!
-
4$\begingroup$ It is expected that you show your own efforts. The minimum that you could have done is coordinates of the points A, B and C as well as the radius of the green circle. Surely you do not expect us to do it for you. $\endgroup$– Alexei BoulbitchMar 23, 2016 at 10:45
-
$\begingroup$ Without making extensive guesses, it's impossible to determine what you're really asking. What would your input be? Centers and radii of the circles? The points A ... F? Something else? What, if anything, are you assuming about the shape of the triangle or the relative sizes and positions of the circles? $\endgroup$– whuberMar 23, 2016 at 14:13
4 Answers
another one liner:
Graphics[{{Yellow, #}, {Green, Circle /@ #[[1]]}}] &@
SSSTriangle[1, 1, 1]
-
$\begingroup$ Nice! Yours has one less variable to set by hand than mine, too, since you get to use unit-radius circles. (+1) $\endgroup$– MarcoBMar 23, 2016 at 17:01
An alternative, perhaps more direct:
pts = CirclePoints[3]
Graphics[{
Thick, Green, Circle[#, Sqrt[3]] & /@ pts,
Yellow, EdgeForm[Black],
FilledCurve@Line@pts
}]
There's probably an easier way to do this, and there is probably a more informative way to do it - more illuminating for those who are new to Mathematica. But this way was more fun for me to come up with, using primarily RegionIntersection
to find the points.
circles = {Circle[{-1/2, 0}, 1], Circle[{1/2, 0}, 1]};
AppendTo[circles,
Circle[RegionIntersection[circles] // First // Last, 1]];
triangle = (RegionIntersection[#1, #2, Disk @@ #3] &) @@@
(RotateRight[circles, #] & /@ Range[3]) // Part[#, All, 1] & // Polygon;
Graphics[{Green, circles, Yellow, EdgeForm[Black], triangle}]
Or, if you are using an older version of Mathematica then you have to get the intersection points yourself,
Graphics[{Green, {Circle[{-(1/2), 0}, 1], Circle[{1/2, 0}, 1],
Circle[{0, Sqrt[3]/2}, 1]}, Yellow, EdgeForm[Black],
Polygon[{{1/2, 0}, {-(1/2), 0}, {0, Sqrt[3]/2}}]}]
-
-
-
$\begingroup$ youtube.com/watch?v=UtVjRG7PB_4&feature=youtu.be&t=9s $\endgroup$– Jason B.Mar 23, 2016 at 12:46
-
$\begingroup$ @AndreaLeo - not that I'm aware, if it doesn't work for you, you need to be more specific, what version are you using, what error message do you get? $\endgroup$– Jason B.Mar 23, 2016 at 12:47
-
1$\begingroup$ @AndreaLeo - see the edit. Out of curiosity, do you know how you would algebraically find the points for the circle centers that make up the triangle? $\endgroup$– Jason B.Mar 23, 2016 at 13:07
The new in M12 function GeometricScene
could be useful for you:
scene = GeometricScene[
{a, b, c}, (* points *)
{
Triangle[{a, b, c}],
CircleThrough[{a, b}, c],
CircleThrough[{b, c}, a],
CircleThrough[{c, a}, b]
}
];
scene //RandomInstance
You can then use FindGeometricConjectures
to find conjectures that hold for the scene:
FindGeometricConjectures[scene]["Conclusions"]
{GeometricAssertion[Polygon[{b, a, c}], "Regular"], Inactive[PlanarAngle][{a, b, c}] == Inactive[PlanarAngle][{b, a, c}] == Inactive[PlanarAngle][{b, c, a}] == 60 [Degree]}
So, the triangle is an equilateral triangle.
-
$\begingroup$ You can also style @CarlWoll's elements to match the original color specs. This doesn't affect FindGeometricConjectures at all. Note that synthetic geometry in MMA is in an experimental release; a simple scene like this will run without issues, though.
scene = GeometricScene[ (*Vertices*) {a, b, c}, (*Hypotheses*) { Style[Triangle[{a, b, c}], Yellow], Style[CircleThrough[{a, b, c}], Red], Style[CircleThrough[{a, b}, c], Green], Style[CircleThrough[{b, c}, a], Green], Style[CircleThrough[{c, a}, b], Green] }]; scene // RandomInstance
$\endgroup$ Dec 15, 2019 at 3:18 -
$\begingroup$ ^^ Sorry for lack of proper code formatting in that last comment. I haven't figured out how to do that in mini-markdown in a comment yet (if it can be done). $\endgroup$ Dec 15, 2019 at 3:19