直角三角形345を調べた。三四五（さしご）の定理。

・直角三角形345と聞いて、3.2,　2.4,　0.7とピンとくるものですか？
・私も。初めて調べました。

# 高校入問題過去問
####  YUUU0123 様 (0:00〜7:29)　**令和5年 鎌倉学園 AE=?**
https://youtu.be/ZBxGRrgJ_iM

三四五(さしご)の定理より(3.2,2.4)=(CF,FA)だから、
相似を使わずに?BA=BE=3

https://www.wolframalpha.com/input?i=%E2%88%9A%28%283-%285-32%2F10%29%29**2%2B%2824%2F10%29**2%29&lang=ja

=(6√5)/5
(2025-02-08 追加)


# 手で計算していないけど、手計算
#### 相似　△AB C∽ △ACH
 （CからABへの垂線の足をHとする。）
```python
from sympy import *
var('AH,CH',real=True,positive=True)
AH=solve(Eq(Rational(5,4),4/AH),AH)[0]
CH=solve(Eq(Rational(5,3),4/CH),CH)[0]
print("#",AH,CH)
print("#",float(AH),float(CH))
# 16/5 12/5
# 3.2 2.4
```
#### 辺が共通　△ACHと △BCH で
```python
from sympy import *
var('Cx',real=True,positive=True)
AB,BC,CA=5,3,4
Cx=solve(Eq(CA**2-Cx**2,BC**2-(AB-Cx)**2),Cx)[0]
Cy=sqrt(CA**2-Cx**2)
print("#",Cx,Cy)
print("#",float(Cx),float(Cy))
# 16/5 12/5
# 3.2 2.4
```


# sympyで
```python
from sympy import *
def myTrMv(mytr,myPt):
    return Triangle(mytr.vertices[0]+myPt,mytr.vertices[1]+myPt,mytr.vertices[2]+myPt) 
tr345=Triangle(sss=(3,4,5)) ;print("#",tr345)
tr453=Triangle(sss=(4,5,3)) ;print("#",tr453)
tr534=Triangle(sss=(5,3,4)) ;print("#",tr534,float(tr534.vertices[2].x),float(tr534.vertices[2].y))
print()
# DX=Point(  0,0)
DX=Point(-5/2,0)
tr534=myTrMv(tr534,DX)       ;print("#",tr534,float(tr534.vertices[2].x),float(tr534.vertices[2].y)) 
# Triangle(Point2D(0, 0), Point2D(3, 0), Point2D(3, 4))
# Triangle(Point2D(0, 0), Point2D(4, 0), Point2D(0, 3))
# Triangle(Point2D(0, 0), Point2D(5, 0), Point2D(16/5, 12/5)) 3.2 2.4

# Triangle(Point2D(-5/2, 0), Point2D(5/2, 0), Point2D(7/10, 12/5)) 0.7 2.4
```


点Aを原点にしました。C(3.2,2.4)
![111.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/109698/c56bbcc5-0b49-cc3b-68f5-87dbce215e08.png)

円の中心を原点にしました。C(0.7,2.4)
![222.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/109698/f7fa094b-00fe-fd2d-9c7d-1b3cad665ebb.png)

# FreeCADのマクロ
・今後.verticesを使います。今までargsを使ってきました。
vertices　A sequence of points.
https://docs.sympy.org/latest/modules/geometry/polygons.html

```python
import FreeCAD
import Part
import DraftTools
import Draft
import Mesh
############################################################################
from sympy import *
def myTrMv(mytr,myPt):
    return Triangle(mytr.vertices[0]+myPt,mytr.vertices[1]+myPt,mytr.vertices[2]+myPt) 
tr345=Triangle(sss=(3,4,5)) ;print("#",tr345)
tr453=Triangle(sss=(4,5,3)) ;print("#",tr453)
tr534=Triangle(sss=(5,3,4)) ;print("#",tr534,float(tr534.vertices[2].x),float(tr534.vertices[2].y))
print()
DX=Point(  0,0)
# DX=Point(-5/2,0)
tr534=myTrMv(tr534,DX)       ;print("#",tr534,float(tr534.vertices[2].x),float(tr534.vertices[2].y)) 
###########################################################################
A=tr534.vertices[0]
B=tr534.vertices[1]
C=tr534.vertices[2]
############################################################################
# 3D作図 z=0 XY平面に作図しました。
############################################################################
# 円の作図　FrecCADのdocより
# https://wiki.freecad.org/Macro_Circle
def Freecad3D_circle(x=0.0,y=0.0,z=0.0,radius=0.0,diameter=0.0,circumference=0.0,area=0.0,startangle=0.0,endangle=0.0,arc=0.0,anglecenter=0.0,cord=0.0,arrow=0.0,center=0,placemObject=""):
    from math import sqrt, pi
    if placemObject == "":
        pl = FreeCAD.Placement()
        pl.Rotation = FreeCADGui.ActiveDocument.ActiveView.getCameraOrientation()   
        pl.Base = FreeCAD.Vector(x,y,z)
    else:
        pl = FreeCAD.Placement()
        pl = placemObject                                  # placement imposted
    if diameter != 0:                                      # with diameter
        radius = diameter / 2.0
    elif circumference != 0:                               # with circumference
        radius = (circumference / pi) / 2.0
    elif area != 0:                                        # with area
        radius =  sqrt((area / pi))
    elif (cord != 0) and (arrow != 0):                     # with cord and arrow
        radius = ((arrow**2) + (cord**2) / 4.0) / (arrow*2) 
    elif (arc != 0) and (anglecenter != 0):                # with arc and anglecenter central in degrees
        radius = ((360/anglecenter)*arc) / pi/2.0
        if endangle != 0:
            startangle  = endangle - anglecenter
        endangle   = anglecenter + startangle
        startangle  = endangle - anglecenter
    if radius != 0:
        try:
            Draft.makeCircle(radius,placement=pl,face=False,startangle=startangle,endangle=endangle,support=None)
            if center != 0:
                x=pl.Base.x
                y=pl.Base.y
                z=pl.Base.z
                Draft.makePoint(x,y,z)
        except Exception:
            App.Console.PrintError("Unexpected keyword argument" + "\n")
        App.ActiveDocument.recompute()
    else:
        App.Console.PrintMessage("Unexpected keyword argument" + "\n")
        App.Console.PrintMessage("circle(x,y,z,radius,diameter,circumference,area,startangle,endangle,[arc,anglecenter],[cord,arrow],center,placemObject)" + "\n")
        App.Console.PrintMessage("circle(radius=10.0,placemObject=App.Placement(App.Vector(11,20,30), App.Rotation(30,40,0), App.Vector(0,0,0)))" + "\n")
    return
def myCircle_2D(myCi):
    x=myCi.center.x
    y=myCi.center.y
    r=myCi.radius
    Freecad3D_circle(
           x=float(x),y=float(y),z=0.0,
           radius=float(abs(r)),
           center=1,
           placemObject=App.Placement(App.Vector(float(x),float(y),0),
           App.Rotation(0,0,0),App.Vector(0,0,0)))
    return
def myXYZ2Txt_2D(A):
    return ""
def myXYZ2Txt_XY_2D(A):
    return '(' + str(A.x) + ',' + str(A.y) +  ')'
def myTxtXYZ_2D(A,myWedgei):
    P5x=float(A.x)
    P5y=float(A.y)
    P5z=0.0
    p5 = FreeCAD.Vector(P5x, P5y, P5z)
    myText = Draft.makeText(myWedgei, p5)
    myText.Label = myWedgei
    # FreeCADGui.ActiveDocument.ActiveObject.FontSize = '0.5 mm'
    FreeCADGui.ActiveDocument.ActiveObject.FontSize = '0.25 mm'
    return
def myTxtXYZ_S_2D(*xy_tx):
    for i in range(1,int(len(xy_tx)/2)+1):
        myTxtXYZ_2D(xy_tx[2*i-2],xy_tx[2*i-1]+myXYZ2Txt_2D(xy_tx[2*i-2]) )
    return
def myTxtXYZ_XY_S_2D(*xy_tx):
    for i in range(1,int(len(xy_tx)/2)+1):
        myTxtXYZ_2D(xy_tx[2*i-2],xy_tx[2*i-1]+myXYZ2Txt_XY_2D(xy_tx[2*i-2]) )
    return
def myLine_2D(A,B):
    Ax,Ay,Az=float(A.x),float(A.y),0.0
    Bx,By,Bz=float(B.x),float(B.y),0.0
    pl = FreeCAD.Placement()
    pl.Rotation.Q = (0.4247081540122249, 0.17592004639554645, 0.33985110062924484, 0.8204732460821097)
    pl.Base = FreeCAD.Vector(-3.9166066876399563, -2.1670824762243774, 1.7495260956243028)
    points = [FreeCAD.Vector(Ax,Ay,Az), FreeCAD.Vector(Bx,By,Bz)]
    line = Draft.make_wire(points, placement=pl, closed=False, face=True, support=None)
    Draft.autogroup(line)
    return
def myLine_S_2D(*args):
    for i in range(1,len(args)):
        myLine_2D(args[i-1],args[i])
    return
def myLine_C_2D(*args):
    for i in range(1,len(args)):
        myLine_2D(args[i-1],args[i])
    myLine_2D(args[i],args[0])
    return
def myLine_H_2D(*args):
    for i in range(1,len(args)):
        myLine_2D(args[0],args[i])
    return
##################################################################################
M=tr534.circumcenter
r=tr534.circumradius
myCircle_2D     (Circle(M,r))
myLine_C_2D     (A,B,C)  
#
# myTxtXYZ_XY_S_2D(M,"O")
myTxtXYZ_XY_S_2D(A,"A",B,"B",C,"C")
####################################################################################
doc = App.activeDocument()
#App.ActiveDocument.addObject("App::Origin", "Origin")
#App.ActiveDocumen!t.getObject('Origin').Visibility = True
App.ActiveDocument.recompute()
Gui.activeDocument().activeView().viewAxonometric()
Gui.SendMsgToActiveView("ViewFit")
```


# google検索。AI による概要あり。

https://www.google.com/search?q=%E4%B8%89%E5%9B%9B%E4%BA%94%EF%BC%88%E3%81%95%E3%81%97%E3%81%94%EF%BC%89%E3%81%AE%E5%AE%9A%E7%90%86&rlz=1CAUHAM_enJP1105&oq=%E4%B8%89%E5%9B%9B%E4%BA%94%EF%BC%88%E3%81%95%E3%81%97%E3%81%94%EF%BC%89%E3%81%AE%E5%AE%9A%E7%90%86&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIKCAEQABiABBiiBDIKCAIQABiABBiiBDIKCAMQABiABBiiBDIKCAQQABiABBiiBDIKCAUQABiABBiiBNIBCDEzMThqMGo3qAIIsAIB&sourceid=chrome&ie=UTF-8

# wikipedia

https://ja.wikipedia.org/wiki/%E4%B8%89%E5%9B%9B%E4%BA%94

https://en.wikipedia.org/wiki/Right_triangle

https://ja.wikipedia.org/wiki/直角三角形

三辺の長さが整数になる直角三角形

https://ja.wikipedia.org/wiki/直角三角形#三辺の長さが整数になる直角三角形

# 大学入問題過去問
”三四五”

https://cse.google.com/cse?cx=a8908fbc24340ebc5&q=%E2%80%9D%E4%B8%89%E5%9B%9B%E4%BA%94%E2%80%9D&oq=%E2%80%9D%E4%B8%89%E5%9B%9B%E4%BA%94%E2%80%9D&gs_l=partner-web.12..0i512i4i37j0i512j0i512i4i37l2j0i512j0i512i4i37l3j0i512j0i512i4i37.2154.14471.0.18783.3.3.0.0.0.0.188.395.1j2.3.0.csems%2Cnrl%3D10...0....1j4.34.partner-web..0.3.395.YkXkPGEEcA8

”三四五” ありました。私の検索方法が不十分です。
site://kamelink.com ”三四五”

https://www.google.com/search?q=site://kamelink.com+%E4%B8%89%E5%9B%9B%E4%BA%94&sca_esv=8d771920c62c0cac&rlz=1CAUHAM_enJP1105&sxsrf=ADLYWIJnBlzHEQcLMrht98GpVvKLZ6p9Fw:1731984659755&ei=E_07Z7nkLfTg2roPlrbJ2AU&start=30&sa=N&sstk=ATObxK7eBo4Jd3MVuhX_YT-NQ7wd2HAU6Z5vEKv98_oFfJq3WHSrMdcrdbGyXMRQakuqtZsxAXgG28749DU2MnK35PUsp7LSRbEjExyN-FFIfZOq9bwRDn51XMlUQWqBX6s5EUdN-zEdUH6b6a71qorBWAVvKx_ajSQ&ved=2ahUKEwj5uZrTseeJAxV0sFYBHRZbEls4FBDw0wN6BAgHEBc&biw=1366&bih=632&dpr=1

3:4:5 多数ありました。
site://mathmathmass.exblog.jp ”三四五”

https://www.google.com/search?q=site%3A%2F%2Fmathmathmass.exblog.jp+%E2%80%9D%E4%B8%89%E5%9B%9B%E4%BA%94%E2%80%9D&rlz=1CAUHAM_enJP1105&oq=site%3A%2F%2Fmathmathmass.exblog.jp+%E2%80%9D%E4%B8%89%E5%9B%9B%E4%BA%94%E2%80%9D&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg70gEHNzMxajBqN6gCCLACAQ&sourceid=chrome&ie=UTF-8