Geometrylessonsgithub May 2026

def slope(p1, p2): """Slope of line through p1 and p2.""" dx = p2[0] - p1[0] if dx == 0: return float('inf') return (p2[1] - p1[1]) / dx

def distance(p1, p2): """Euclidean distance between two points (x,y) tuples.""" return math.hypot(p1[0]-p2[0], p1[1]-p2[1]) geometrylessonsgithub

class PointConstruction(Scene): def construct(self): dot_a = Dot(LEFT * 2, color=BLUE) dot_b = Dot(RIGHT * 2, color=RED) label_a = MathTex("A").next_to(dot_a, DOWN) label_b = MathTex("B").next_to(dot_b, DOWN) def slope(p1, p2): """Slope of line through p1 and p2

## Exercises 1. Identify collinear sets from an image. 2. Name rays and segments given endpoints. 3. Construct a line through two points using code. </code></pre> <hr> <h3><strong>4. Sample Animation: <code>lessons/01_points_lines/animations/point_construction.py</code></strong></h3> <pre><code class="language-python">from manim import * y) tuples.""" return math.hypot(p1[0]-p2[0]

## Visuals (from `animations/point_construction.py`) - Animated dots appearing - Line extending beyond view - Ray starting at endpoint