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?

大人用です。正方形「高校入試チャレンジ問題 GD=? 中学生ならば、多くの生徒が考える解法は・・・」様を、計算はsympyで作図は手抜きのつもりでした。

0
Last updated at Posted at 2026-08-01

・AI先生に作図してもらいました。

オリジナル

YUUU0123 様 (0:00〜2:50) いつもお世話になっております。
↓高校入試チャレンジ問題 GD=? 中学生ならば、多くの生徒が考える解法は・・・
https://youtu.be/nXhY1Z7jerY

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

ver0.1

・先生の丸写しです。

from sympy import *
var('x,y',real=True,positive=True)
sol=solve([Eq(y,2*x),Eq(y,-Rational(1,2)*x+5)],[x,y])  #;print(sol)
print("#",sqrt((5-sol[x])**2+(5-sol[y])**2))
# # sqrt(10)

sympyで

・もっとsympy らしく?

ver1.1

# ver1.1
from sympy import *
A,B,C,D=map(Point,[(0,5),(0,0),(5,0),(5,5)])
E,F    =A.midpoint(D),C.midpoint(D) 
G      =Line(A,F).intersection(Line(B,E))[0] #;print(G)
print("#",G.distance(D))
# sqrt(10)

(本日の)ChatGPT先生へ

PNG図のみ作図して下さい。
(ver1.1の表示省略)

image.png

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

sympyのweb上での実行方法

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

(テンプレート)

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

sympy のdoc

ver0.1

ver1.1

・intersection(other) < Line
https://docs.sympy.org/latest/modules/geometry/lines.html#sympy.geometry.line.LinearEntity.intersection

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?