home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / share / k3d / scripts / MeshSourceScript / simple_polyhedron.py < prev    next >
Encoding:
Text File  |  2008-11-24  |  402 b   |  13 lines

  1. #python
  2.  
  3. import k3d
  4. k3d.check_node_environment(locals(), "MeshSourceScript")
  5.  
  6. # Create two triangles, arranged to form a square ...
  7. vertices = [k3d.point3(-3, -3, 0), k3d.point3(3, -3, 0), k3d.point3(3, 3, 0), k3d.point3(-3, 3, 0)]
  8. vertex_counts = [3, 3]
  9. vertex_indices = [0, 1, 3, 1, 2, 3]
  10. material = None
  11. polyhedron = k3d.polyhedron.create(Output, vertices, vertex_counts, vertex_indices, material)
  12.  
  13.