Thanks heaps guys appreciate the responses, here's a small bonus script I just whipped up then. Sorry for the lack of commenting, I'm happy to answer any questions people may be having.
Code
from __future__ import division
from visual import *
from math import *
a=[]
loops=10
radius=1
for degr in range(36*loops):
x= cos(radians(degr*10))*radius
y= sin(radians(degr*10))*radius
z= cos(radians(degr*10*loops))
a.insert(degr,[sphere(pos=(x,y,z),radius=(abs(x)+abs(y))/16,visible=False),curve(color=(1,1,1))])
radius = radius+degrees(1.618033989)
b=0
while 1:
rate(20)
b=b+1
radius=1
for i in range(len(a)):
x= cos(radians((i+b)*10))*radius
y= sin(radians((i+b)*10))*radius
z= cos(radians((i+b)*10*loops))*radius*cos(radians(b))
a[i][0].pos=(x,y,z)
a[i][1].append(a[i][0].pos)
a[i][1].color= color.hsv_to_rgb(((b+i)%256/256,(b+1+64)%256/256,(b+1+128)%100/256+.6))
radius = radius+degrees(1.618033989)
(Feb 2, 2012 12:40 PM)PseudoMander Wrote: Thanks heaps guys appreciate the responses, here's a small bonus script I just whipped up then. Sorry for the lack of commenting, I'm happy to answer any questions people may be having.
Code
from __future__ import division
from visual import *
from math import *
a=[]
loops=10
radius=1
for degr in range(36*loops):
x= cos(radians(degr*10))*radius
y= sin(radians(degr*10))*radius
z= cos(radians(degr*10*loops))
a.insert(degr,[sphere(pos=(x,y,z),radius=(abs(x)+abs(y))/16,visible=False),curve(color=(1,1,1))])
radius = radius+degrees(1.618033989)
b=0
while 1:
rate(20)
b=b+1
radius=1
for i in range(len(a)):
x= cos(radians((i+b)*10))*radius
y= sin(radians((i+b)*10))*radius
z= cos(radians((i+b)*10*loops))*radius*cos(radians(b))
a[i][0].pos=(x,y,z)
a[i][1].append(a[i][0].pos)
a[i][1].color= color.hsv_to_rgb(((b+i)%256/256,(b+1+64)%256/256,(b+1+128)%100/256+.6))
radius = radius+degrees(1.618033989)
Awesome, although I can't really understand how do you come up with it - do you use same frame and randomly change constants or are your changes purposeful (e.g. can you imagine it before actually running it)?
Usually I imagine a structure then make it to the best of my ability. However mid-way through design I'm often inspired to take it in a different direction and will usually do so, so to answer your question they're not always congruent to the pictures in my head but are quite slight adaptions of such (On a mathematical level anyway).
This is awesome...
btw managed to crash your cannon sim/ w/e, here's error for future bug fix :P
Code
Traceback (most recent call last):
File "C:\Users\Dom\Desktop\visualiser.py", line 207, in <module>
checkcolbomb()
File "C:\Users\Dom\Desktop\visualiser.py", line 121, in checkcolbomb
burst(bomb[i][0].pos,bomb[i][0].velocity)
File "C:\Users\Dom\Desktop\visualiser.py", line 76, in burst
makewall(blockwall[i1-e].pos,dire,blockwall[i1-e].size[1]/6)
File "C:\Users\Dom\Desktop\visualiser.py", line 143, in makewall
for i2 in range(height):
TypeError: range() integer end argument expected, got float.