1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

大人用です。角度計算「鎌倉学園高校∠E=?」様を、計算はsympyで作図は手抜きのつもりでした。

1
Last updated at Posted at 2026-08-08

・本日作図できませんでした。申し訳ありません。
・ChatGPT
 「現在、データ分析 を使い切りました。さらに使うには無料のPlus トライアルを開始するか、明日の 20:28 以降 にもう一度お試しください。」

オリジナル

YUUU0123 様 (0:00〜2:35) いつもお世話になっております。
↓鎌倉学園高校∠E=?
https://youtu.be/zuHe9D4KHss

いつものsympyで(オリジナル Youtbe様の方法を参考に)

ver0.1

# ver0.1
from sympy import *
var('x,a',real=True,positive=True)
a=solve(Eq(2*a+3*a,90     ),a)[0] #;print(a)
x=solve(Eq(90+x   ,3*a+4*a),x)[0]  ;print("#",x)
# 36

ver0.2

・上と同じです。連立方程式です。

# ver0.2
from sympy import *
var('x,a',real=True,positive=True)
print("#",solve([Eq(2*a+3*a,90),Eq(90+x,3*a+4*a)],[x,a])[x])
# 36

ver0.3

・Youtubeのコメント様 に一票。
・補助線不要。⌒DA:⌒AB:⌒BC:⌒CD=2:3:4:(2+3-4)

# ver0.3  
from sympy import *
var('x,a',real=True,positive=True)
print("#",solve([Eq(90+2*a+3*a,180),Eq(3*a,(2+3-4)*a+x)],[x,a])[x])
# 36

いつもの sympyで

ver1.1

・sympyの座標計算は、角度計算だけは苦手のようです。ユーザー定義関数はGemini先生に教えてもらいました。

# ver1.1
from sympy import *
var('r,θ',real=True,positive=True)    ;r=1
def simplify_angle_deg(angle_rad):
    """ラジアン表記の角度を簡略化し、度数法の値に変換する関数"""
    return nsimplify(deg(sqrtdenest(angle_rad)))
θ    =solve(Eq((2+3)*θ,pi),θ)[0]                     #;print(θ)
O,B,D=map(Point,[(0,0),(-r,0),(r,0)])
A    =    Point(r*cos( 2     *θ),r*sin( 2     *θ))
C    =    Point(r*cos((2+3+4)*θ),r*sin((2+3+4)*θ))
E    =Line(B,C).intersection(Line(A,D))[0]           #;print(E)  
print("#",      Line(E,D).angle_between(Line(E,B)).simplify())
print("#",simplify_angle_deg(      Line(E,D).angle_between(Line(E,B)).simplify()))
# acos((sqrt(2) + sqrt(10)/2)/sqrt(3*sqrt(5) + 7))
# 36

(本日の)ChatGPT先生へ

・作図はコチラ。Gemini先生は苦手のようです。

PNG図のみ出力して下さい。
(ソースコードの表示を省略)
線分EC ED AB を追加して下さい。  

(再)現在、データ分析 を使い切りました。さらに使うには無料のPlus トライアルを開始するか、明日の 20:28 以降 にもう一度お試しください。

いつもの? sympyの実行環境 と 参考のおすすめです。

sympyのweb上での実行方法

SymPy Live Shellで。FreeCADのマクロは、以下で実行できません。

(テンプレート)

いつもと違うおすすめです。

Qiita内

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?