Пример #1
0
def stonehenge():
    c1 = dlc.cube().scale_z(3).translate_z(1.5)
    c2 = dlc.cylinder(r = 0.5).scale_z(3).translate_z(1.5).translate_x(4)
    c3 = dlc.cube().scale_x(5).translate_z(3.5).translate_x(2)
    c4 = dlc.cone(r = 0.5).translate_z(0.5).scale_z(0.25).translate_z(3).translate_x(4)
    stones = [c1,c2,c3,c4]
    dlc.build(stones,consume = True)
Пример #2
0
def stonehenge():
    c1 = dlc.cube().scale_z(3).translate_z(1.5)
    c2 = dlc.cylinder(r=0.5).scale_z(3).translate_z(1.5).translate_x(4)
    c3 = dlc.cube().scale_x(5).translate_z(3.5).translate_x(2)
    c4 = dlc.cone(
        r=0.5).translate_z(0.5).scale_z(0.25).translate_z(3).translate_x(4)
    stones = [c1, c2, c3, c4]
    dlc.build(stones, consume=True)
Пример #3
0
def test():
    import dilap.construct as dlc

    mdata = meshdata()
    p = [dpv.vector(0,0,0),dpv.vector(1,0,0),dpv.vector(1,1,0),dpv.vector(0,1,0),
         dpv.vector(0,0,1),dpv.vector(1,0,1),dpv.vector(1,1,1),dpv.vector(0,1,1)]
    dpv.scale_coords(p,dpv.one().scale_u(10))

    m = mdata._mesh()
    m._quad(p[3],p[2],p[1],p[0])._quad(p[4],p[5],p[6],p[7])
    m._quad(p[0],p[1],p[5],p[4])._quad(p[2],p[3],p[7],p[6])
    m._quad(p[1],p[2],p[6],p[5])._quad(p[3],p[0],p[4],p[7])
    m._decimate()._decimate()._smooths(100)._triangulate()._calculate_normals()._project_uv_flat()

    tmodels = [terrain(mesh = msh) for msh in mdata.meshes]
    dlc.build(*tmodels)

    pdb.set_trace()
Пример #4
0
def test():
    import dilap.construct as dlc
    p = dpv.zero()
    d = dpv.z()

    #pythagoras_tree()._realize(p,d)
    #dragon_curve()._realize(p,d)

    total = dmo.model()

    #for l in range(5):tree(l)._realize(p,d)
    ltree(-1)._realize(p,d)
    tps = [(x,y) for x in range(3) for y in range(3)]
    for i,xy in enumerate(tps):
        x,y = xy
        kws = {'seed':i}
        lmod = ltree(-1,**kws)._realize(p,d).model
        lmod.translate(dpv.vector(10*x,10*y,0))
        total._consume(lmod)
    
    dlc.build(total)
Пример #5
0
def roads():
    r1 = dlc.road()
    dlc.build(r1)
Пример #6
0
def floor():
    gap = (dpv.zero(), 2, 3)
    f = dlc.floor(gap=gap)
    dlc.build(f)
Пример #7
0
def pipes():
    p1 = dlc.pipe()
    dlc.build(p1)
Пример #8
0
def wall():
    v1 = dpv.zero()
    v2 = dpv.zero().translate_x(5).translate_y(10)
    wa = dlc.wall(v1, v2, 3, 0.25)
    dlc.build(wa)
Пример #9
0
def perim():
    vs = dpr.point_ring(10, 6)
    pm = dlc.perimeter(vs, 3, 0.25)
    dlc.build(pm)
Пример #10
0
def cone():
    l = 2.4
    dlc.build(dlc.cone(r=2, h=3, n=16))
Пример #11
0
def wall():
    v1 = dpv.zero()
    v2 = dpv.zero().translate_x(5).translate_y(10)
    wa = dlc.wall(v1,v2,3,0.25)
    dlc.build(wa)
Пример #12
0
def afmtest():
    dlc.build(tms.afmtest())
Пример #13
0
def cone():
    l = 2.4
    dlc.build(dlc.cone(r = 2,h = 3,n = 16))
Пример #14
0
def afmtest():
    dlc.build(tms.afmtest())
Пример #15
0
def roads():
    r1 = dlc.road()
    dlc.build(r1)
Пример #16
0
def pipes():
    p1 = dlc.pipe()
    dlc.build(p1)
Пример #17
0
def floor():
    gap = (dpv.zero(),2,3)
    f = dlc.floor(gap = gap)
    dlc.build(f)
Пример #18
0
def perim():
    vs = dpr.point_ring(10,6)
    pm = dlc.perimeter(vs,3,0.25)
    dlc.build(pm)
Пример #19
0
def cube():
    l = 2.4
    dlc.build(dlc.cube(l).translate_x(3).translate_y(0.5).translate_z(5))
Пример #20
0
def cube():
    l = 2.4
    dlc.build(dlc.cube(l).translate_x(3).translate_y(0.5).translate_z(5))