Pi walking

Rory's Avatar

Rory

31 Mar, 2015 11:07 AM

This visualisation of pi assigns a color to each digit and an angle. Each time a digit is encountered a rect of the color is created and the origin moves by the relevant angle a distance the height of the rect. This means we are seeing pi in a directional state.

The angle is calculated for each digit using the following python function:

def x_points(data, index):
points_dict = {0 : (0, -10), 1 : (5.88, -8.09), 2 : (9.51, -3.09), 3 : (9.51, 3.09), 4 : (5.88, 9.09), 5 : (0, 10), 6 : (-5.88, 8.09), 7 : (-9.51, 3.090), 8 : (-9.511, -3.09), 9 : (-5.88, -8.09) } x_points = [0] for num in data[:-1]: x_points.append(x_points[-1] + points_dict[num][index]) return x_points

From the origin (0, 0) the x,y, coordinates are summed according to the item returned and this is what gives the visual its shape.

Comments very welcome....

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_1.ndbx 7.64 KB
  • pi.csv 770 KB
  • pi_funcs.py 1.06 KB
  • pi1.pdf 171 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

Generic

? 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

01 Jul, 2022 02:31 AM
30 Jun, 2022 09:46 PM
30 Jun, 2022 07:01 PM
16 Jun, 2022 05:30 AM
06 Jun, 2022 01:07 PM

 

02 Jun, 2022 11:58 PM
30 May, 2022 03:37 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