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

26 Mar, 2023 12:11 PM
26 Mar, 2023 12:02 PM
24 Mar, 2023 09:51 PM
23 Mar, 2023 09:43 PM
23 Mar, 2023 08:23 AM

 

21 Mar, 2023 11:00 AM
21 Mar, 2023 09:32 AM
21 Mar, 2023 04:46 AM
12 Mar, 2023 03:02 AM
11 Mar, 2023 02:11 AM
10 Mar, 2023 06:47 AM