Esempio n. 1
0
def podium(MiroSystem, pos, spin=0):
    foot_h = 0.01
    foot_r = 0.9
    leg_h = 0.005
    leg_r = 0.02
    podium_r= 0.9
    podium_h = 0.01

    foot_pos = [pos[0], pos[1]+foot_h/2, pos[2]]
    leg_pos = [pos[0], pos[1]+foot_h+leg_h/2, pos[2]]
    podium_pos = [pos[0], pos[1]+foot_h+leg_h+podium_h/2, pos[2]]

    # Foot
    foot = MiroAPI.add_cylinderShape(MiroSystem, foot_r, foot_h, 1000, foot_pos, texture='black.jpg', Fixed=False)
    # Pole
    leg = MiroAPI.add_cylinderShape(MiroSystem, leg_r, leg_h, 500, leg_pos, texture='gammal5kr.png', Fixed=False)
    # Sign
    podium = MiroAPI.add_cylinderShape(MiroSystem, podium_r, podium_h, 1000, podium_pos, texture='podium-logo.jpg', Fixed=False)
    # Hinges
    h1 = [pos[0], pos[1]+foot_h, pos[2]]
    h2 = [pos[0], pos[1]+foot_h+leg_h, pos[2]]
    MiroAPI.LinkBodies_Hinge(foot, leg, h1, [0,1,0], MiroSystem)
    MiroAPI.LinkBodies_Hinge(leg, podium, h2, [0,1,0], MiroSystem)
    if spin:
        MiroAPI.SetBodyAngularFrequency(podium, spin)
Esempio n. 2
0
def sponsorFlag(MiroSystem, pos, logo, spin=0):
    foot_h = 0.08
    foot_r = 0.3
    leg_h = 0.4
    leg_r = 0.02
    sign_h = 1.6
    sign_w = 0.6
    sign_t = 0.03

    foot_pos = [pos[0], pos[1]+foot_h/2, pos[2]]
    leg_pos = [pos[0], pos[1]+foot_h+leg_h/2, pos[2]]
    sign_pos = [pos[0], pos[1]+foot_h+leg_h+sign_h/2, pos[2]]

    # Foot
    foot = MiroAPI.add_cylinderShape(MiroSystem, foot_r, foot_h, 1000, foot_pos, texture='black_smere.jpg', Fixed=False, scale=[1,-1])
    # Pole
    leg = MiroAPI.add_cylinderShape(MiroSystem, leg_r, leg_h, 500, leg_pos, texture='black_smere.jpg', Fixed=False, scale=[1,-1])
    # Sign
    sign = MiroAPI.add_boxShape(MiroSystem, sign_w, sign_h, sign_t, sign_pos, density=30, texture=logo, Fixed=False)
    # Hinges
    h1 = [pos[0], pos[1]+foot_h, pos[2]]
    h2 = [pos[0], pos[1]+foot_h+leg_h, pos[2]]
    MiroAPI.LinkBodies_Hinge(foot, leg, h1, [0,1,0], MiroSystem)
    MiroAPI.LinkBodies_Hinge(leg, sign, h2, [0,1,0], MiroSystem)
    if spin:
        MiroAPI.SetBodyAngularFrequency(sign, spin)