コード例 #1
0
ファイル: main.py プロジェクト: alitteneker/CS268
def manipulation(pointCloud):
    startSize = len(pointCloud.points)

    # TODO: it would be a lot better to parameterize this in the input file . . . but laziness . . .
    print "\tManipulation: Adding two spheres"
    pointCloud.addPoints( Point.generateSpherePoints( centerPos=Util.vector([0,-0.1,0.9,1]), radius=0.05, lightPos=Util.vector([0,-2,0,1]), albedo=np.array([255,0,0]), numPoints=20000 ) )
    pointCloud.addPoints( Point.generateSpherePoints( centerPos=Util.vector([0.2,0.1,1.15,1]), radius=0.1, lightPos=Util.vector([0,-2,0,1]), albedo=np.array([0,255,0]), numPoints=70000 ) )

    print "\tManipulation added " + str( len(pointCloud.points) - startSize ) + " points"
コード例 #2
0
ファイル: main.py プロジェクト: alitteneker/CS268-HW4
def manipulation(pointCloud):
    startSize = len(pointCloud.points)
    pointCloud.addPoints( Point.generateSpherePoints( centerPos=Util.vector([0,-0.1,0.9,1]), radius=0.05, lightPos=Util.vector([0,-2,0,1]), albedo=np.array([255,0,0]), numPoints=8000 ) )
    pointCloud.addPoints( Point.generateSpherePoints( centerPos=Util.vector([0.2,0.1,1.2,1]), radius=0.1, lightPos=Util.vector([0,-2,0,1]), albedo=np.array([0,255,0]), numPoints=28000 ) )
    print "\tManipulation added " + str( len(pointCloud.points) - startSize ) + " points"