Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

visualization_demo.py 329B

8 年前
8 年前
8 年前
123456789101112
  1. from abp.viz import VisibleGraphState
  2. import numpy as np
  3. s = VisibleGraphState()
  4. for i in range(200):
  5. x = 10*np.cos(np.pi*2*i/60)
  6. y = 10*np.sin(np.pi*2*i/60)
  7. s.add_node(i, {"position": (round(x, 2), round(y, 2), round(i/50., 2))})
  8. s.act_local_rotation(i, "hadamard")
  9. for i in range(200-1):
  10. s.act_cz(i, i+1)