예제 #1
0
#-*- coding: utf-8 -*-

from extra.projectionViewer import ProjectionViewer
from construction.construction import body_nodes, body_edges, tire, road
from extra.wireframe import Wireframe

from extra.extra import Vector3d

if __name__ == "__main__":

    bolid = Wireframe()

    #Bolid building

    count = 0
    height = 80
    dist = 10

    bolid_nodes = body_nodes()
    bolid_edges = body_edges()

    bolid.addNodes(bolid_nodes)
    bolid.addEdges(bolid_edges)

    count += len(bolid_nodes)

    anchor1 = (230, 230, 70)
    anchor2 = (230, 230, -70)
    anchor3 = (570, 230, 50)
    anchor4 = (570, 230, -50)
예제 #2
0
#-*- coding: utf-8 -*-

from extra.projectionViewer import ProjectionViewer
from extra.wireframe import Wireframe

if __name__ == "__main__":
    cube_nodes = [(x,y,z) for x in (50,250) for y in (50,250) for z in (50,250)]

    cube = Wireframe()
    cube.addNodes(cube_nodes)
    cube.addEdges([(n,n+4) for n in range(0,4)])   #(0,4),(1,5),(2,6),(3,7)
    cube.addEdges([(n,n+1) for n in range(0,8,2)]) #(0,1),(2,3),(4,5),(6,7)
    cube.addEdges([(n,n+2) for n in (0,1,4,5)])    #(0,2),(1,3),(4,6),(5,7)

    cube.outputNodes()
    cube.outputEdges()

    pv = ProjectionViewer(400,300)
    pv.addWireframe('cube', cube)
    pv.run()