Anders and Briegel in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
355B

  1. from abp.fancy import GraphState
  2. from abp.util import xyz
  3. import numpy as np
  4. N = 100
  5. g = GraphState()
  6. for i in range(N):
  7. theta = 2*np.pi*i/30
  8. pos = xyz(5*np.cos(theta), 5*np.sin(theta), i/10.)
  9. g.add_node(i, position = pos, vop=0)
  10. for i in range(N):
  11. g.act_cz(i, (i+1) % N)
  12. g.act_local_rotation(i, 12)
  13. g.act_local_rotation(i, 10)