The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

Show your WorkFrom the old forum

Pi Dots

1 reply Last reply

  1. 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

    Copy link
  2. 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]

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply