Tech News
← Back to articles

CasNum

read original related products more articles

CasNum

CasNum (Compass and straightedge Number) is a library that implements arbitrary precision arithmetic using compass and straightedge constructions. Arbitrary precision arithmetic, now with 100% more Euclid. Featuring a functional modified Game Boy emulator where every ALU opcode is implemented entirely through geometric constructions.

Table of Contents

Introduction To Compass And Straightedge Constructions

This project began with a simple compass-and-straightedge 'engine', which can be found under the directory cas/ . In compass-and-straightedge constructions, one start with just two points: The origin, and a unit. Exactly as God intended. The engine then allows us to do what the ancients did:

Construct the line through two points

Construct the circle that contains one point and has a center at another point

Construct the point at the intersection of two (non-parallel) lines

Construct the one or two points in the intersection of a line and a circle (if they intersect)

Construct the one point or two points in the intersection of two circles (if they intersect) (Which, by the way turns out to be a nasty 4th degree equation. Check out the formula in circle.py , over 3600 characters, yikes. Good thing we have WolframAlpha).

... continue reading