# Polynomials in GEOMETOR

This document captures the essential knowledge from the `polynumbers` project for integration into `geometor.model`.

## Overview

The `polynumbers` project explored the generation, analysis, and rendering of polynomial curves. The goal is to integrate this functionality into the `geometor` ecosystem, making polynomials a first-class element type.

## Mathematical Foundations

Two primary types of polynomials were explored:

### 1. Golden Polynomials

These polynomials are derived from the quadratic equation whose roots are the golden ratio, φ.

-   **Base Polynomial:** `P(x) = x² - x - 1`
-   **Series Generation:** A series of Golden Polynomials is generated by multiplying the base polynomial by successive powers of `x`:
    -   `P₁(x) = x * (x² - x - 1) = x³ - x² - x`
    -   `P₂(x) = x² * (x² - x - 1) = x⁴ - x³ - x²`
    -   `Pₙ(x) = xⁿ * (x² - x - 1)`

The key characteristic of these polynomials is that their roots always include 0, φ, and (1-φ).

### 2. Spread Polynomials

Inspired by Dr. Norman J. Wildberger's work on Rational Trigonometry, Spread Polynomials are defined by a specific recurrence relation. They have interesting properties related to Chebyshev Polynomials.

The formula used for generation in the `polynumbers` project is:

`Sₙ(s) = 2n * Σ [ ((-4)^(k-1))/(n+k) * C(n+k, 2k) * s^k ]` for `k` from 1 to `n`.

Where `C(n, k)` is the binomial coefficient.

## Modeling as an Element

A new `Polynomial` element will be added to `geometor.model`.

-   It will be defined by its **coefficients**. For a polynomial `P(x) = aₙxⁿ + ... + a₁x + a₀`, the element will store the list `[a₀, a₁, ..., aₙ]`.
-   Initially, we will focus on the **Golden Polynomials**, as they have a direct link to geometric constructions involving the golden ratio.
-   The `Model` class will have a new factory function, `add_poly(coeffs)`, to create and add these elements to a construction.
