Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #rutenburgs stuff, doubling N
- for a in arange(8):
- N1 = N1*2
- print N1
- for i in arange(N1):
- x1 = random()
- y1 = random()
- z1 = random()
- a1 = random()
- b1 = random()
- c1 = random()
- d1 = random()
- e1 = random()
- f1 = random()
- g1 = random()
- variable1 = x1**2.0+y1**2.0+z1**2.0+a1**2.0+b1**2.0+c1**2.0+d1**2.0+e1**2.0+f1**2.0+g1**2.0
- if variable1 <= 1.0:
- count1 += 1.0
- I1 = cube/N1*count1
- print I1
- #I dont know why this isnt working....
- Nlist.append(N1)
- Ilist.append(I1)
- print Ilist
- plot(Ilist,Nlist)
- xlabel("Volume")
- ylabel("Number of iterations")
- show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement