Giter VIP home page Giter VIP logo

pi-day-2020-visualization's Introduction

PI Day 2020 - a visualization

A simple yet fascinating way of visualizing the first million digits of PI

Visualizing the first million digits of PI in a colorful (and round) way, in honor of the 2020 PI day.
This script will generate an image like this:

PI visualization

Each arc connects two consecutives digits of PI. The color and the starting position of the arc is set by the first digit and the arc lands in the region of the second digit. If the first digit is bigger than the second, the arc will be drawn on the higher half of the image. Otherwise, it will be drawn on the lower one.
After one million of digits, this is what the script renders.

The script can be tweaked in multiple way to get a different output (for example, the size of the output image and the number of digits visualized can be changed). Currently, it generates a 10000 pixels by 10000 pixels PNG image using 1 million of pi digits (found in the pi.txt file inside the data folder).
You can run the program by yourself (mind that it will be quite slow) or view the full-size image in the rendered folder (very big, about 63MB). In the same same folder there's also a rescaled 1000 pixels by 1000 pixels image.

Credits

The font used is Roboto by Christian Robertson.

The pi.txt file was sourced on piday.org

pi-day-2020-visualization's People

Contributors

lorossi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.