0
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?

大人用です。弦の分割長さ「高校入試頻出問題 半円Oの面積を求めよ」様を、計算はsympyで作図は手抜きのつもりでした。

0
Last updated at Posted at 2026-08-16

オリジナル

YUUU0123 様 (0:00〜2:24) いつもお世話になっております。
↓高校入試頻出問題 半円Oの面積を求めよ
https://youtu.be/LSmzDvOmYNA

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

ver0.1

・先生の丸写しです。図形の証明は省略です。

# ver0.1
from sympy import *
AD,DC,OD=3,5,2
PA      =Rational(1,2)*(AD+DC)
PO      =sqrt(3)
r       =sqrt(PA**2+PO**2) # ;print(r)
print("#",Rational(1,2)*pi*r**2)
# 19*pi/2

いつもの sympyで

ver1.1

・私は、円と円の交点計算と単位ベクトル で解きました? 解いてもらいました。
 作図あります。

from sympy import *
var('r',real=True,positive=True)
AD,DC,OD=3,5,2
A,O,B   =map(Point,[(-r,0),(0,0),(r,0)])
D       =Circle(A,AD).intersection(Circle(O,OD))[1]  #;print(D)
C       =D+DC*(D-A).unit
r_sol   =solve(Eq(O.distance(C),r))[0]                ;print("#",r_sol,float(r_sol))
print("#",Rational(1,2)*pi*r_sol**2)
# sqrt(19) 4.358898943540673
# 19*pi/2

(続けて)Gemini先生へ

PNG図のみ出力して下さい。
(ソースコードの表示を省略)

・Geminiでできなかったので、ChatGPTでSVG図→PNG図変換です。

image.png

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

sympyのweb上での実行方法

SymPy Live Shellで。
ソースコードの解説は、私よりGemini先生へのソースコードの丸投げがおすすめです。質問の追加はいくらでも。
モーダル対応?「実行して」。「作図して」「問題文章の丸投げ」いい時代です。

(テンプレート)

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

sympy のdoc

・いらないカモ。

ver0.1

ver1.1

0
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
0
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?