Geometry intro: How to find the distance, line equation, midpoint & line slope using SymPy in Python

Опубликовано: 02 Август 2024
на канале: tondekush
48
0

A quick intro to plane geometry.
#python #mathematics #pythonprogramming
Code:
from sympy.geometry import *
from sympy import *
init_printing()
x = symbols("x")
a = Point(0,7)
b = Point(3,19)
s = Segment(a,b)
s.length
l = Line(a,b)
l.equation()
s.midpoint
l.slope
y = 4*x +7
plot(y)

Here is the alternative video with Maple
   • Geometry intro: How to find the dista...