Esempio n. 1
0
    sinLine = zeros((len(x), 5))
    sinLine[:, 0] = x
    sinLine[:, 1] = y
    sinLine[:, 2] = z
    sinLine[:, 3] = 1
    sinLine[-1, 3:5] = [0, armSpeed]

    return sinLine


# rozdeli 0-360 stupnov na 3 casti (4 okrajove body)
verts = linspace(pi / 4, 9 * pi / 4, numSlabs + 1)
slabPosX = cos(verts) * circR
slabPosY = sin(verts) * circR
slab0 = mStr.slabStr([0.2, 0.2, 0.2], [0, 1, 2], [xyres, 0.2], slabSpeed)
viscoStruct = slab0
for i in range(numSlabs):
    #stlpik pod kruhom ukonceny gulickou
    slab1 = mStr.slabStr([slabSz[0], slabSz[1], slabSz[2] + sphereR / 3],
                         [0, 1, 2], [xyres, 0.2], slabSpeed)
    slab1.shift([slabPosX[i] - slabSz[0] / 2, slabPosY[i] - slabSz[1] / 2, 0])
    viscoStruct.addStr(slab1)
    sph1 = mStr.sphereStr(slabPosX[i],
                          slabPosY[i],
                          slabSz[2] + sphereR,
                          sphereR,
                          sphereSpeed,
                          xyres,
                          1.0,
                          1,
Esempio n. 2
0
    x = concatenate((x1[0:-1], x2[1:]))
    y = concatenate((y1[0:-1], y2[1:]))
    z = zeros_like(x) + lineElev

    sinLine = zeros((len(x), 5))
    sinLine[:, 0] = x
    sinLine[:, 1] = y
    sinLine[:, 2] = z
    sinLine[:, 3] = 1
    sinLine[-1, 3:5] = [0, linespeed]

    return sinLine


# vytvori stlpec a posunieho tak, aby (0,0) bolo v strede celnej steny
slab1 = mStr.slabStr(slabSz, [0, 1, 2], [xyres, 0.5], slabSpeed)
slab1.shift([-slabSz[0], -slabSz[1] / 2, 0])
viscoStruct = slab1

# na stlpec ulozi rozsirenie - manzetu
slabExt = mStr.slabStr(slabExtSz, [0, 1, 2], [xyres, 0.5], slabSpeed)
slabExt.shift([-(slabSz[0] + slabSzDifX / 2), -slabExtSz[1] / 2, slabSz[2]])
viscoStruct.addStr(slabExt)

# skopiruje stlpec aj s rozsirenim do druhehe a posinie ho o 2 * lineLength
slab2 = deepcopy(viscoStruct)
slab2.shift([(lineLength) * 2 + slabSz[0], 0, 0])
viscoStruct.addStr(slab2)

# vyutvori ciaru ktorej prva polovica bude usecka a druha sinusovka
sinLine = halfSinLine()  #sinusLine()