Pick a curve, search for rational points, then click two of them to watch the chord-and-tangent group law add them together — with exact fraction arithmetic, no rounding.
Weierstrass form, coefficients may be integers or fractions like -3/4.
Real locus over ℝ, with every rational point found so far.
Search to populate this list.
Pick a point P from the list, then compute P, 2P, 3P, … up to nP by repeated addition.
| n | nP | decimal |
|---|
Three points on a Weierstrass curve that lie on a common line always sum to the identity, the point at infinity 𝒪. So to add P and Q: draw the line through them, find the third point R′ where it crosses the curve, then reflect R′ over the x-axis to get P + Q. To double a point P, use the tangent line at P instead of a secant.
This gives the curve's points the structure of an abelian group. Coordinates are kept as exact fractions throughout (via JavaScript BigInt), so results are never rounded — only the plot is drawn in floating point.
The point search only checks x = p/q with |p| and q bounded by the numerator range and max denominator above, so it can miss rational points with larger height — it is a demonstration, not a complete search.