Pi Dots

Rory's Avatar


31 Mar, 2015 10:54 AM

In the flurry of activity on Pi day I took the opportunity to make two visualisations based on others I had seen floating around. This one assigns a color to each digit of pi and then creates a square pixel and stacks them in towers to completely fill a 1000*1000 canvas. The size and hence number of digits processed is contoled by the point_size node.

The best way for me to associate a number with a colour was to write my own python node that basically uses a dictinary to look up items. How could this be achieved with the existing NodeBox nodes?

Attached is the .ndbx file and the .py file the .csv file of pi digits and and an example rendering.

Comments very welcome

  1. 1 Posted by Rory on 31 Mar, 2015 11:02 AM

    Rory's Avatar

    Sorry, in fact the colours are selected using a selector node. There is a list of 10 colours (indexed from 0 to 9) and the pi digit is used to index that list in the following python function:

    def selector(items, index):
    return items[index]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • pi_2.ndbx 4.65 KB
  • pi_funcs.py 1.06 KB
  • pi.csv 770 KB
  • pi2.pdf 517 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Jun, 2022 05:30 AM
15 Jun, 2022 06:03 AM
06 Jun, 2022 01:07 PM
02 Jun, 2022 11:58 PM
30 May, 2022 07:48 AM


24 May, 2022 06:27 PM
20 May, 2022 04:12 PM
05 May, 2022 02:25 AM
03 May, 2022 04:46 AM
01 May, 2022 09:22 AM
18 Apr, 2022 09:01 PM