コード例 #1
0
ファイル: meniere.py プロジェクト: zy20091082/primer
    def outline(self):
        md = tex_bobject.TexBobject("\\text{Meniere\'s Disease}",
                                    location=[0, 0, 0],
                                    centered=True,
                                    typeface='arial',
                                    scale=3)
        md.add_to_blender(appear_time=0, subbobject_timing=[30] * 9 + [75] * 7)
        md.move_to(new_location=[0, 3.5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject('\\bullet\\text{Inner ear overview}',
                                         color='color2',
                                         typeface='arial')
        cause = tex_bobject.TexBobject(
            '\\bullet\\text{Symptoms and diagnosis}',
            color='color2',
            typeface='arial')
        treat = tex_bobject.TexBobject('\\bullet\\text{Treatment options}',
                                       color='color2',
                                       typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          location=[-9, 0.5, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4, subbobject_timing=[0, 35, 70])
        contents.disappear(disappear_time=7)
        md.disappear(disappear_time=7)
コード例 #2
0
    def pt_list(self):
        vn = tex_bobject.TexBobject("\\text{Contributors to balance}",
                                    location=[0, 0, 0],
                                    centered=True,
                                    typeface='arial',
                                    scale=2.5)
        vn.add_to_blender(appear_time=0)
        vn.move_to(new_location=[0, 5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject('\\bullet\\text{Sensory}',
                                         color='color2',
                                         typeface='arial')
        cause = tex_bobject.TexBobject('\\bullet\\text{Biomechanical}',
                                       color='color2',
                                       typeface='arial')
        treat = tex_bobject.TexBobject('\\bullet\\text{Neurologic}',
                                       color='color2',
                                       typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          location=[-9, 0.5, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4, subbobject_timing=[0, 60, 120])
        #contents.disappear(disappear_time = 7)
        #vn.disappear(disappear_time = 7)
        '''vn.move_to(
            new_location = [0, 5.5, 0],
            start_time = 6.5
        )'''

        vn.disappear(disappear_time=16)
コード例 #3
0
    def long_term_symptoms(self):
        lt = tex_bobject.TexBobject(
            "\\text{Long-term effects}",
            location=[-12.5, 5.5, 0],
            #centered = True,
            typeface='arial',
            scale=3)
        lt.add_to_blender(appear_time=0)

        vnga = tex_bobject.TexBobject(
            "\\bullet\\text{Vertigo and nystagmus go away}",
            typeface='arial',
        )
        rb = tex_bobject.TexBobject(
            "\\bullet\\text{Reduced balance}",
            typeface='arial',
        )
        d = tex_bobject.TexBobject(
            "\\bullet\\text{Dizziness}",
            typeface='arial',
        )
        bv = tex_bobject.TexBobject(
            "\\bullet\\text{Blurred vision}",
            typeface='arial',
        )
        nhl = tex_bobject.TexBobject(
            "\\bullet\\text{Not hearing loss}",
            typeface='arial',
        )
        n = []
        for i in range(1, 4):
            n.append(nhl.lookup_table[0][i])
        for char in n:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=4,
                duration_time=200,
            )

        contents = tex_complex.TexComplex(vnga,
                                          rb,
                                          d,
                                          bv,
                                          nhl,
                                          location=[-11.5, 2, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=1,
                                subbobject_timing=[0, 35, 70, 105, 140])
コード例 #4
0
ファイル: meniere.py プロジェクト: zy20091082/primer
    def symptom_list(self):
        lt = tex_bobject.TexBobject(
            "\\text{Symptoms}",
            location=[-12.5, 5.75, 0],
            #centered = True,
            typeface='arial',
            scale=3)
        lt.add_to_blender(appear_time=0)

        vnga = tex_bobject.TexBobject(
            "\\bullet\\text{Usually affects one side}",
            typeface='arial',
        )
        rb = tex_bobject.TexBobject(
            "\\bullet\\text{Hearing loss}",
            typeface='arial',
        )
        d = tex_bobject.TexBobject(
            "\\bullet\\text{Ringing in the ears}",
            "\\bullet\\text{Ringing in the ears (tinnitus)}",
            typeface='arial',
        )
        bv = tex_bobject.TexBobject(
            "\\bullet\\text{Intense vertigo episodes}",
            typeface='arial',
        )
        nhl = tex_bobject.TexBobject(
            "\\bullet\\text{Feeling of pressure or fullness}",
            typeface='arial',
        )

        contents = tex_complex.TexComplex(vnga,
                                          rb,
                                          d,
                                          bv,
                                          nhl,
                                          location=[-11.5, 2.5, 0],
                                          scale=1.75,
                                          multiline=True)
        contents.add_to_blender(appear_time=0,
                                subbobject_timing=[35, 70, 105, 175, 210])

        d.morph_figure(1, start_frame=140)
コード例 #5
0
    def migraine_outline(self):
        vn = tex_bobject.TexBobject(
            #"\\text{Vestibular migraine}",
            "\\text{Some migraine symptoms}",
            location=[0, 0, 0],
            centered=True,
            typeface='arial',
            scale=3)
        vn.add_to_blender(appear_time=0)
        vn.move_to(new_location=[0, 5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject('\\bullet\\text{Headache}',
                                         color='color2',
                                         typeface='arial')
        cause = tex_bobject.TexBobject(
            '\\bullet\\text{Seeing lights and colors}',
            color='color2',
            typeface='arial')
        treat = tex_bobject.TexBobject(
            '\\bullet\\text{Light and sound sensitivity}',
            color='color2',
            typeface='arial')
        nausea = tex_bobject.TexBobject('\\bullet\\text{Nausea}',
                                        color='color2',
                                        typeface='arial')
        others = tex_bobject.TexBobject('\\bullet\\text{Others}',
                                        '\\bullet\\text{Dizziness}',
                                        color='color2',
                                        typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          nausea,
                                          others,
                                          location=[-9, 1.75, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4,
                                subbobject_timing=[0, 35, 70, 105, 140])
        others.morph_figure(1, start_time=7)
        #contents.disappear(disappear_time = 7)
        #vn.disappear(disappear_time = 7)
        '''vn.move_to(
コード例 #6
0
    def common_causes(self):
        cc = tex_bobject.TexBobject(
            "\\text{Possible causes:}",
            location=[-11, 4.75, 0],
            #centered = True,
            typeface='arial',
            scale=2.4)
        cc.add_to_blender(appear_time=0)

        nd = tex_bobject.TexBobject('\\bullet\\text{Neurologic diseases}',
                                    color='color2',
                                    typeface='arial')
        bt = tex_bobject.TexBobject('\\bullet\\text{Brain tumors}',
                                    color='color2',
                                    typeface='arial')
        ad = tex_bobject.TexBobject('\\bullet\\text{Autoimmune diseases}',
                                    color='color2',
                                    typeface='arial')
        ab = tex_bobject.TexBobject(
            '\\bullet\\text{Aminoglycoside antibiotics}',
            color='color2',
            typeface='arial')
        ex = tex_bobject.TexBobject(
            '\\bullet\\text{Heavy metals and jet fuel}',
            color='color2',
            typeface='arial')
        cause_list = tex_complex.TexComplex(nd,
                                            bt,
                                            ad,
                                            ab,
                                            ex,
                                            location=[-8, 2, 0],
                                            scale=1.5,
                                            multiline=True)
        cause_list.add_to_blender(appear_time=1,
                                  subbobject_timing=[0, 45, 90, 135, 180])
        #cause_list.disappear(disappear_time = 8)
        #bvl.disappear(disappear_time = 7)
        to_disappear = [cc, nd, bt, ad, ab, ex]
        for i, thing in enumerate(to_disappear):
            thing.disappear(disappear_time=6 -
                            (len(to_disappear) - 1 - i) * 0.05)
コード例 #7
0
ファイル: meniere.py プロジェクト: zy20091082/primer
    def treatment_list(self):
        lt = tex_bobject.TexBobject("\\text{Treatment categories}",
                                    location=[0, 5.5, 0],
                                    centered=True,
                                    typeface='arial',
                                    scale=3)
        lt.add_to_blender(appear_time=0)

        vnga = tex_bobject.TexBobject(
            "\\bullet\\text{Symptomatic}",
            typeface='arial',
        )
        rb = tex_bobject.TexBobject(
            "\\bullet\\text{Ablative}",
            typeface='arial',
        )
        d = tex_bobject.TexBobject(
            "\\bullet\\text{Non-ablative}",
            typeface='arial',
        )
        bv = tex_bobject.TexBobject(
            "\\bullet\\text{Restorative}",
            typeface='arial',
        )

        contents = tex_complex.TexComplex(vnga,
                                          rb,
                                          d,
                                          bv,
                                          location=[-11.5, 2.25, 0],
                                          scale=2.25,
                                          multiline=True)
        contents.add_to_blender(appear_time=1,
                                subbobject_timing=[0, 35, 70, 105])

        for i in range(13):
            char = d.lookup_table[0][i]
            char.color_shift(duration_time=1.1,
                             color=COLORS_SCALED[2],
                             start_time=4)
コード例 #8
0
    def dizziness_factors(self):
        vn = tex_bobject.TexBobject("\\text{Contributing factors}",
                                    location=[0, 0, 0],
                                    centered=True,
                                    typeface='arial',
                                    scale=2.5)
        vn.add_to_blender(appear_time=0)
        vn.move_to(new_location=[0, 4.5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject('\\bullet\\text{Visual}',
                                         color='color2',
                                         typeface='arial')
        cause = tex_bobject.TexBobject('\\bullet\\text{Somatosensory}',
                                       color='color2',
                                       typeface='arial')
        treat = tex_bobject.TexBobject('\\bullet\\text{Vestibular}',
                                       color='color2',
                                       typeface='arial')
        disease = tex_bobject.TexBobject(
            '\\bullet\\text{Diseases and medications}',
            color='color2',
            typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          disease,
                                          location=[-9, 1.5, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4,
                                subbobject_timing=[0, 35, 70, 105])
        #contents.disappear(disappear_time = 7)
        #vn.disappear(disappear_time = 7)
        '''vn.move_to(
            new_location = [0, 5.5, 0],
            start_time = 6.5
        )'''

        vn.disappear(disappear_time=16)
コード例 #9
0
    def acronym_breakdown(self):
        b = tex_bobject.TexBobject('\\text{B}',
                                   '\\text{Benign}',
                                   color='color2')
        pa = tex_bobject.TexBobject('\\text{P}',
                                    '\\text{Paroxysmal}',
                                    color='color2')
        po = tex_bobject.TexBobject('\\text{P}',
                                    '\\text{Positional}',
                                    color='color2')
        v = tex_bobject.TexBobject('\\text{V}',
                                   '\\text{Vertigo}',
                                   color='color2')
        """baf = svg_bobject.SVGBobject(
            'B_Arial',
            'BaFC_Arial',
            location = [0, 0, 0],
            #scale = 1.85,
            color = 'color2'
        )"""
        """gaf = svg_bobject.SVGBobject(
            'BaFC_Arial',
            location = [0, 0, 0],
            #scale = 1.85,
            color = 'color2'
        )"""
        bppv = tex_complex.TexComplex(b,
                                      pa,
                                      po,
                                      v,
                                      scale=6,
                                      location=[-6.8, 0, 0])

        bppv.add_to_blender(appear_frame=0,
                            animate=False,
                            subbobject_timing=[0, 24, 48, 72])

        bppv.move_to(new_location=[-12.5, 4, 0], new_scale=4, start_time=2.5)
        acronym = tex_bobject.TexBobject(
            '\\bullet\\text{Break down the acronym}', color='color2')
        cause = tex_bobject.TexBobject('\\bullet\\text{Understand the cause}',
                                       color='color2')
        treat = tex_bobject.TexBobject(
            '\\bullet\\text{Look at diagnosis and treatment}', color='color2')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          location=[-11, 0, 0],
                                          scale=1.75,
                                          multiline=True)
        contents.add_to_blender(appear_time=4, subbobject_timing=[0, 30, 60])
        contents.disappear(disappear_time=6)

        bppv.multiline = True
        bppv.arrange_tex_bobjects(start_time=7, end_time=7.5)
        bppv.move_to(start_time=7, new_scale=3, new_location=[-12.5, 5.5, 0])

        b.morph_figure(1, start_time=8)
        pa.morph_figure(1, start_time=9)
        po.morph_figure(1, start_time=10)
        v.morph_figure(1, start_time=11)

        for char in b.subbobjects:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=12,
                duration_time=2,
            )
        for char in pa.subbobjects:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=15,
                duration_time=2,
            )
        for char in po.subbobjects:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=18,
                duration_time=2,
            )
        for char in v.subbobjects:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=21,
                duration_time=2,
            )

        #"You get BPPV"
        for i, word in enumerate(bppv.subbobjects):
            char = word.lookup_table[1][0]  #second figure, first char
            char.pulse(start_time=24 + 0.25 * i,
                       duration_time=0.5,
                       attack=0.2 * FRAME_RATE,
                       decay=0.2 * FRAME_RATE)

        for thing in bppv.subbobjects:
            thing.disappear(disappear_time=27)
        """b_note_loc = [2.5, 5.4, 0]
コード例 #10
0
    def outline(self):
        sc = tex_bobject.TexBobject(
            "\\text{Superior Canal}",
            location = [0, 1.5, 0],
            centered = True,
            typeface = 'arial',
            scale = 2.5
        )
        sc.add_to_blender(
            appear_time = 0,
            subbobject_timing = [30] * 8 + [75] * 5
        )
        sc.move_to(
            new_location = [0, 5, 0],
            start_time = 4
        )

        ds = tex_bobject.TexBobject(
            "\\text{Dehiscence Syndrome}",
            location = [0, -1.5, 0],
            centered = True,
            typeface = 'arial',
            scale = 2.5
        )
        ds.add_to_blender(
            appear_time = 2,
            subbobject_timing = [30] * 10 + [75] * 8
        )
        ds.move_to(
            new_location = [0, 2, 0],
            start_time = 4
        )

        acronym = tex_bobject.TexBobject(
            '\\bullet\\text{Inner ear overview}',
            color = 'color2',
            typeface = 'arial'
        )
        cause = tex_bobject.TexBobject(
            '\\bullet\\text{Symptoms}',
            color = 'color2',
            typeface = 'arial'
        )
        treat = tex_bobject.TexBobject(
            '\\bullet\\text{Diagnosis and treatment}',
            color = 'color2',
            typeface = 'arial'
        )
        contents = tex_complex.TexComplex(
            acronym, cause, treat,
            location = [-9, -1.5, 0],
            scale = 1.5,
            multiline = True
        )
        contents.add_to_blender(
            appear_time = 4,
            subbobject_timing = [35, 70, 105]
        )
        contents.disappear(disappear_time = 7)
        #vn.disappear(disappear_time = 7)

        sc.move_to(
            new_location = [-7.5, 6, 0],
            new_scale = 1.6,
            start_time = 6.5
        )
        ds.move_to(
            new_location = [5.2, 6, 0],
            new_scale = 1.6,
            start_time = 6.5
        )

        s = []
        for i in range(0, 13):
            s.append(sc.lookup_table[0][i])
        for char in s:
            char.color_shift(
                color = COLORS_SCALED[2],
                start_time = 8,
                duration_time = 2,
            )
        for char in s:
            char.color_shift(
                color = COLORS_SCALED[2],
                start_time = 13,
                duration_time = 2,
            )

        d = []
        for i in range(0, 10):
            d.append(ds.lookup_table[0][i])
        for char in d:
            char.color_shift(
                color = COLORS_SCALED[2],
                start_time = 10.5,
                duration_time = 2,
            )

        sc.disappear(disappear_time = 16)
        #sc.move_to(new_location = [0, 5.5, 0], start_time = 15.75)
        ds.disappear(disappear_time = 16)
コード例 #11
0
    def pre_transplant(self):
        #Stretch goal: Make blobs look around in a more directed way
        cues = self.subscenes['pre_transplant']

        make_image_background('colon_zoom_right.png')

        #Zoom out to effectively make the bacteria smaller
        zoom_out_factor = 2
        x_shift = 10.5
        cam_bobj = bobject.Bobject(
            location = [
                CAMERA_LOCATION[0],
                CAMERA_LOCATION[1],
                zoom_out_factor * CAMERA_LOCATION[2],
            ]
        )
        cam_bobj.add_to_blender(appear_time = 0)
        cam_obj = bpy.data.objects['Camera']
        cam_obj.location = [0, 0, 0]
        cam_obj.parent = cam_bobj.ref_obj

        colon_points = [
            [-5.498534679412842, -3.8365087509155273, 0],
            [-6.38494873046875, -3.227099657058716, 0],
            [-6.717353343963623, -2.146782875061035, 0],
            [-6.634251117706299, -0.9279640316963196, 0],
            [-6.551150321960449, 1.2049685716629028, 0],
            [-6.384949207305908, 2.4237873554229736, 0],
            [-6.218745708465576, 3.42100191116333, 0],
            [-6.440348148345947, 4.584420204162598, 0],
            [-6.274146556854248, 6.163344860076904, 0],
            [-5.249231338500977, 6.27414608001709, 0],
            [-4.196613788604736, 5.969441890716553, 0],
            [-3.227100133895874, 5.609334945678711, 0],
            [-2.063681125640869, 5.415432929992676, 0],
            [-0.9556646347045898, 5.332330703735352, 0],
            [0.26315388083457947, 5.24923038482666, 0],
            [1.5096733570098877, 5.332330703735352, 0],
            [2.589988946914673, 5.415432453155518, 0],
            [3.5318045616149902, 5.637035846710205, 0],
            [4.639822483062744, 6.052542209625244, 0],
            [5.637034893035889, 6.440348148345947, 0],
            [6.4957499504089355, 6.301846504211426, 0],
            [6.301847457885742, 4.667520999908447, 0],
            [6.495749473571777, 3.531803846359253, 0],
            [6.163345813751221, 2.4237871170043945, 0],
            [6.274145603179932, 0.7063607573509216, 0],
            [6.246445178985596, -1.1772679090499878, 0],
            [5.914041996002197, -2.8115925788879395, 0],
            [5.221530437469482, -3.947310209274292, 0],
            [4.55672025680542, -5.05532693862915, 0],
            [2.9223949909210205, -6.052542686462402, 0],
            [1.6481753587722778, -6.191044807434082, 0],
            [0.06925218552350998, -6.4403486251831055, 0],
            [-0.016619933769106865, -8.26026725769043, 0],
            [-0.9805952310562134, -7.828138828277588, 0],
            [-1.1135575771331787, -6.465278148651123, 0],
            [-0.9473539590835571, -5.434823036193848, 0],
            [-0.44874706864356995, -5.069177150726318, 0],
            [0.7146719098091125, -5.335101127624512, 0],
            [1.711885690689087, -5.733987808227539, 0],
            [2.742342472076416, -5.534544944763184, 0],
            [3.6065964698791504, -4.803253650665283, 0],
            [4.537330627441406, -3.83927845954895, 0],
            [5.035937309265137, -2.5096583366394043, 0],
            [5.401581287384033, -1.0138355493545532, 0],
            [5.534543514251709, 1.1135568618774414, 0],
            [5.501305103302002, 2.5428988933563232, 0],
            [5.468064785003662, 3.8060386180877686, 0],
            [5.069177150726318, 5.36834192276001, 0],
            [3.8060388565063477, 4.902975559234619, 0],
            [1.8448481559753418, 4.437607288360596, 0],
            [0.648189127445221, 4.171682834625244, 0],
            [-0.5152283310890198, 4.2049241065979, 0],
            [-1.645405888557434, 4.204923629760742, 0],
            [-2.8420634269714355, 4.736772060394287, 0],
            [-4.204924583435059, 5.102417945861816, 0],
            [-5.501304626464844, 5.401582717895508, 0],
            [-5.667506694793701, 4.969455242156982, 0],
            [-5.733987808227539, 3.6065945625305176, 0],
            [-5.733988285064697, 2.376697063446045, 0],
            [-5.634267330169678, 1.6786457300186157, 0],
            [-5.7672295570373535, 1.0470755100250244, 0],
            [-5.9334306716918945, -0.2493036538362503, 0],
            [-5.501305103302002, -1.8116075992584229, 0],
            [-5.035937786102295, -2.8753042221069336, 0],
            [-4.969456672668457, -3.506873369216919, 0],
        ]
        #Not sure exactly how this happened, but all those points are off by
        #a scale factor
        for i in range(len(colon_points)):
            new_point = deepcopy(colon_points[i])
            colon_points[i] = [
                new_point[0] * 1.45 * zoom_out_factor + x_shift,
                new_point[1] * 1.45 * zoom_out_factor,
                new_point[2] * 1.45 * zoom_out_factor,
            ]


        sim_duration = 500
        start_delay = 0.5
        frames_per_time_step = 1

        #initial_creature_count = 10
        blue_count = 90
        green_count = 10
        initial_creatures = []
        for i in range(blue_count):
            new_creature = creature.Creature(
                color = 'creature_color_1',
                shape = 'shape1',
                size = '0.5'
            )
            initial_creatures.append(new_creature)
        for i in range(green_count):
            new_creature = creature.Creature(
                color = 'creature_color_2',
                shape = 'shape1',
                size = '0.5'
            )
            initial_creatures.append(new_creature)
        sim = drawn_world.DrawnWorld(
            name = 'limited_sim',
            location = [0, 0, 0],
            scale = 0.7,
            start_delay = start_delay,
            frames_per_time_step = frames_per_time_step,
            sim_duration = sim_duration,
            spin_creatures = True,
            initial_creatures = initial_creatures,
            creature_model = ['bacteria', 'biochem'],
            #save = True,
            #load = 'o_logistic2',
            overlap_okay = True,
            gene_updates = [
                #Other alleles
                ['shape', 'shape1', 'birth_modifier', 1, 0],
                ['size', '0.5', 'birth_modifier', 1, 0],
                ['shape', 'shape1', 'mutation_chance', 0, 0],
                ['size', '0.5', 'mutation_chance', 0, 0],
                #Color 1 initial settings
                ['color', 'creature_color_1', 'birth_modifier', 900, 0],
                ['color', 'creature_color_1', 'death_modifier', 10, 0],
                ['color', 'creature_color_1', 'replication_modifier', 0, 0],
                ['color', 'creature_color_1', 'mutation_chance', 0, 0],
                #Color 2 initial settings
                ['color', 'creature_color_2', 'birth_modifier', 100, 0],
                ['color', 'creature_color_2', 'death_modifier', 10, 0],
                ['color', 'creature_color_2', 'replication_modifier', 0, 0],
                ['color', 'creature_color_2', 'mutation_chance', 0, 0],
                #Antibiotic
                ['color', 'creature_color_1', 'birth_modifier', 900, 120],
                ['color', 'creature_color_1', 'death_modifier', 90, 120],
                ['color', 'creature_color_2', 'birth_modifier', 100, 120],
                ['color', 'creature_color_2', 'death_modifier', 20, 120],
                #Color 2 dominates
                ['color', 'creature_color_1', 'birth_modifier', 400, 180],
                ['color', 'creature_color_1', 'death_modifier', 10, 180],
                ['color', 'creature_color_2', 'birth_modifier', 600, 180],
                ['color', 'creature_color_2', 'death_modifier', 10, 180],


            ],
            world_bound_points = colon_points,
            bound_mode = 'points',
            show_world = False
        )


        sim.add_to_blender(appear_time = 0)

        healthy = import_object(
            'bacteria', 'biochem',
            location = [-21.5, 10, 0],
            scale = 6
        )
        apply_material(healthy.ref_obj.children[0], 'creature_color3')
        healthy_text = tex_bobject.TexBobject(
            '\\text{Healthy Bacteria}',
            location = [-21.5, 3, 0],
            centered = True,
            scale = 2,
            color = 'color2'
        )

        healthy.add_to_blender(appear_time = 0)
        healthy_text.add_to_blender(appear_time = 0)



        unhealthy = import_object(
            'bacteria', 'biochem',
            location = [-21.5, -5, 0],
            scale = 6
        )
        apply_material(unhealthy.ref_obj.children[0], 'creature_color7')
        clos = tex_bobject.TexBobject(
            '\\text{Clostridium}',
            color = 'color2',
            centered = True
        )
        diff = tex_bobject.TexBobject(
            '\\text{difficile}',
            color = 'color2',
            centered = True
        )
        unhealthy_text = tex_complex.TexComplex(
            clos, diff,
            location = [-21.5, -13, 0],
            centered = True,
            scale = 2,
            multiline = True,
        )
        unhealthy_text.add_to_blender(appear_time = 0)
        unhealthy.add_to_blender(appear_time = 0)

        #Prep for next scene
        to_disappear = []
        for i, thing in enumerate(to_disappear):
            thing.disappear(disappear_time = cues['end'] - (len(to_disappear) - 1 - i) * 0.05)


        """print()
コード例 #12
0
    def outline(self):
        vn = tex_bobject.TexBobject("\\text{Vestibular Neuritis}",
                                    location=[0, 0, 0],
                                    centered=True,
                                    typeface='arial',
                                    scale=3)
        vn.add_to_blender(appear_time=0,
                          subbobject_timing=[30] * 10 + [75] * 8)
        vn.move_to(new_location=[0, 3.5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject(
            '\\bullet\\text{Vestibular system overview}',
            color='color2',
            typeface='arial')
        cause = tex_bobject.TexBobject('\\bullet\\text{Symptoms}',
                                       color='color2',
                                       typeface='arial')
        treat = tex_bobject.TexBobject('\\bullet\\text{Treatments}',
                                       color='color2',
                                       typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          location=[-9, 0.5, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4, subbobject_timing=[0, 35, 70])
        contents.disappear(disappear_time=7)
        #vn.disappear(disappear_time = 7)

        vn.move_to(new_location=[0, 5.5, 0], start_time=6.5)

        itis = []
        for i in range(14, 18):
            itis.append(vn.lookup_table[0][i])
        for char in itis:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=8,
                duration_time=2,
            )

        neur = []
        for i in range(10, 14):
            neur.append(vn.lookup_table[0][i])
        for char in neur:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=10.5,
                duration_time=2,
            )

        vest = []
        for i in range(0, 10):
            vest.append(vn.lookup_table[0][i])
        for char in vest:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=13,
                duration_time=2,
            )

        vn.disappear(disappear_time=16)
コード例 #13
0
    def intro(self):
        bvl = tex_bobject.TexBobject("\\text{Bilateral Vestibular Loss}",
                                     location=[0, 0, 0],
                                     centered=True,
                                     typeface='arial',
                                     scale=2.4)
        bvl.add_to_blender(appear_time=0,
                           subbobject_timing=[30] * 9 + [75] * 10 + [120] * 4)

        bvl.move_to(new_location=[0, 3.5, 0], start_time=2.5)

        acronym = tex_bobject.TexBobject(
            '\\bullet\\text{Vestibular system overview}',
            color='color2',
            typeface='arial')
        cause = tex_bobject.TexBobject('\\bullet\\text{Symptoms}',
                                       color='color2',
                                       typeface='arial')
        treat = tex_bobject.TexBobject('\\bullet\\text{Causes and treatment}',
                                       color='color2',
                                       typeface='arial')
        contents = tex_complex.TexComplex(acronym,
                                          cause,
                                          treat,
                                          location=[-10.1, 0.5, 0],
                                          scale=1.5,
                                          multiline=True)
        contents.add_to_blender(appear_time=4, subbobject_timing=[0, 35, 70])
        contents.disappear(disappear_time=7)
        #bvl.disappear(disappear_time = 7)

        bvl.move_to(new_location=[0, 5.5, 0], start_time=6.5)

        l = []
        for i in range(19, 23):
            l.append(bvl.lookup_table[0][i])
        for char in l:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=8,
                duration_time=2,
            )

        v = []
        for i in range(9, 19):
            v.append(bvl.lookup_table[0][i])
        for char in v:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=10.5,
                duration_time=2,
            )

        b = []
        for i in range(0, 9):
            b.append(bvl.lookup_table[0][i])
        for char in b:
            char.color_shift(
                color=COLORS_SCALED[2],
                start_time=13,
                duration_time=2,
            )

        bvl.disappear(disappear_time=16)