primespiral

command module
v0.0.0-...-9d67fe4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

README

primespiral

A small program that visualizes prime numbers using polar coordinates. Each prime number is plotted as a point (r, theta) = (p, p) where r is the radius, theta the angle and p a prime number.

Requirements

To build primespiral primegen and Go Graphics need to be installed. Do go get github.com/jbarham/primegen and go get github.com/fogleman/gg to install these packages.

Usage

Run primespiral with go run primesprial.go

Open a web browser and enter http://localhost:8080/primes?max=1000&pointsize=10

The max query parameter specifies the largest prime number that is drawn and the pointsize parameter sets the size of the points.

Credits

This program was inspired by the wonderful video Why do prime numbers make these spirals?

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL