It is a mathematics capable of performing some plane geometry.

I am trying to use a computer to show some flat geometry graphics. I don't know what software can do this, or math can easily create such graphics.

For example, I have the following chart. Given any triangle ABC, let AD be the angle of intersection of the line BAC and intersect BC in D. Let M be the midpoint of AD. Let a circle whose diameter is AB intersect CM at F.

How to make these graphs and show the corresponding marking of points in mma? Is it easy to do? Can someone please give an example or give recommendations as to which software is best suited for this purpose?

Thank you very much.

+4
source share
6 answers

I thought I'd show you how to approach this in Mathematica. Although not the easiest thing to encode, it has flexibility. Also keep in mind that the author is rather inappropriate when it comes to graphics, so it can be simpler and / or more effective ways.

offset[pt_, center_, eps_] := center + (1 + eps)*(pt - center); pointfunc[{pt_List, center_List, ptname_String}, siz_, eps_] := {PointSize[siz], Point[pt], Inset[ptname, offset[pt, center, eps]]}; Manipulate[Module[ {plot1, plot2, plot3, siz = .02, ab = bb - aa, bc = cc - bb, ac = cc - aa, cen = (aa + bb)/2., x, y, soln, dd, mm, ff, lens, pts, eps = .15}, plot1 = ListLinePlot[{aa, bb, cc, aa}]; plot2 = Graphics[Circle[cen, Norm[ab]/2.]]; soln = NSolve[{Norm[ac]*({x, y} - aa).ab - Norm[ab]*({x, y} - aa).ac == 0, ({x, y} - cc).({-1, 1}*Reverse[bc]) == 0}, {x, y}]; dd = {x, y} /. soln[[1]]; mm = (dd + aa)/2; soln = NSolve[{({x, y} - cen).({x, y} - cen) - ab.ab/4 == 0, ({x, y} - cc).({-1, 1}*Reverse[mm - cc]) == 0}, {x, y}]; ff = {x, y} /. soln; lens = Map[Norm[# - cc] &, ff]; ff = If[OrderedQ[lens], ff[[1]], ff[[2]]]; pts = {{aa, cen, "A"}, {bb, cen, "B"}, {cc, cen, "C"}, {dd, cen, "D"}, {ff, cen, "F"}, {mm, cen, "M"}, {cen, ff, "O"}}; pts = Map[pointfunc[#, siz, eps] &, pts]; plot3 = Graphics[Join[pts, {Line[{aa, dd}], Line[{cc, mm}]}]]; Show[plot1, plot2, plot3, PlotRange -> {{-.2, 1.1}, {-.2, 1.2}}, AspectRatio -> Full, Axes -> False]], {{aa, {0, 0}}, {0, 0}, {1, 1}, Locator}, {{bb, {.8, .7}}, {0, 0}, {1, 1}, Locator}, {{cc, {.1, 1}}, {0, 0}, {1, 1}, Locator}, TrackedSymbols :> None] 

Here is a screenshot.

enter image description here

Daniel Lichtblow Wolfram Research

+4
source

Here you can make a graph with Geometry Expressions in two minutes. It has many nice features, including geometric element calculations and an interface for exporting formulas to Mathematica.

The formula in the drawing was calculated by the program.

enter image description here

Free, $ 79 - $ 99 to be able to save.

+5
source

Here's a very quick fix using GeoGebra for the problem you described.

This is the first time I use GeoGebra, and it took me about 20 minutes to make the program, so it is pretty well made and intuitive. Moreover, it can export to Java-based dynamic web pages. Here is an example for the problem you specified: TriangleCircle .

Edit

For demonstrations of Mathematica, there are many good examples in Flat Geometry . On this page, I discovered other software such as Cabri Geometry and Geometer Sketchpad .

+5
source

Mathematica is not the best software for this, although it will work.

http://demonstrations.wolfram.com/DrawingATriangle/ has the source code for a really nice triangle, and after this example you can add a dividing line in half to the code.

+2
source

As already mentioned, Mathematica is not the best software for this. There are several options you can use, depending on your specific purpose. To programmatically create such numbers, there are several languages ​​specifically designed for such tasks. I would recommend trying eukleides or GCLC . If you have experience with TeX / LaTeX, you can look at metapost or asymptote or even a LaTeX package like tkz-euklide .

If you, on the other hand, prefer to create your drawings in an interactive way, several programs are available. Search the Internet for “dynamic geometry software,” you should get a few hits. Of these, I would recommend geogebra .

+2
source

I thought I should really try to solve this problem in Mathematica (only after I finished did I see Daniel's solution). It took me about half an hour - it's longer than my GeoGebra solution, even though I had never used GeoGebra before.

The code is not as fast as possible. This is because I was too lazy to create code to search for intersections of lines and circles, so I used the slower but more general FindInstance .

A fairly extensive package of plane geometry can be found as part of Eric Weinstein MathWorld Packages . It includes all the intersection codes, halves, etc. that you might want, but it takes a little time to learn all this.

 angleBisector[A_,{B_,C_}]:=Module[{ba=Norm[BA],ca=Norm[CA],m}, m=A+((BA)/ba+(CA)/ca)] intersect[Line[{A_,B_}],Line[{C_,D_}]]:=Module[{s,t}, A + s(BA)/ .First@FindInstance [A + s(BA) == C + t(DC), {s,t}]] intersect[Line[{A_,B_}],Circle[p0:{x0_,y0_},r_]]:=Module[{s,x,y}, A + s(BA)/.FindInstance[A + s(BA) == {x,y} && Norm[p0-{x,y}] == r, {s,x,y}, Reals, 2]] Manipulate[Module[{OO,circ,tri,angB,int,mid,FF}, OO=(AA+BB)/2; circ=Circle[OO,Norm[AA-BB]/2]; tri=Line[{AA,BB,CC,AA}]; angB=angleBisector[AA,{BB,CC}]; int=intersect[Line[{BB,CC}],Line[{AA,angB}]]; mid=(AA+int)/2; FF=intersect[Line[{CC,mid}],Circle[OO,Norm[AA-BB]/2]]; Graphics[{PointSize[Large],Point[{OO,int,mid}],Point[FF],tri,circ, Line[{AA,AA+3(angB-AA)}],Line[{CC,CC+3(mid-CC)}], Text["A",AA,{2,-2}],Text["B",BB,{-2,-2}],Text["C",CC,{2,2}], Text["O",OO,{0,-2}],Text["D",int,{-2,-1}],Text["M",mid,{-2,-1}]}, PlotRange->{{-2,2},{-2,2}}]], {{AA,{-1,1}},Locator}, {{BB,{1,1}},Locator}, {{CC,{0,-1}},Locator}] 

TriangleCircle

+1
source

Source: https://habr.com/ru/post/1340869/


All Articles