{"id":95936,"date":"2026-08-27T03:48:37","date_gmt":"2026-08-26T19:48:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/95936.html"},"modified":"2026-08-27T03:48:37","modified_gmt":"2026-08-26T19:48:37","slug":"%e8%8e%ab%e6%af%94%e4%b9%8c%e6%96%af%e5%b8%a6%e7%9a%84%e6%95%b0%e5%ad%a6%e5%8e%9f%e7%90%86%e5%92%8c%e8%a7%86%e8%a7%89%e7%89%b9%e6%80%a7","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/95936.html","title":{"rendered":"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027"},"content":{"rendered":"<p>import numpy as np<br \/>\nfrom manim import *<br \/>\nimport manim.utils.rate_functions as rate_funcs<\/p>\n<p># \u5b9a\u4e49\u9ed1\u677f\u7684\u9ed1\u7eff\u8272<br \/>\nBLACKBOARD_GREEN &#061; &#034;#1E352F&#034;<\/p>\n<p>class MobiusRaceScene04(ThreeDScene):<\/p>\n<p>    def construct(self):<br \/>\n        # 1. \u8bbe\u7f6e\u9ed1\u677f\u80cc\u666f\u8272\u548c\u521d\u59cb\u76f8\u673a\u89c6\u89d2<br \/>\n        self.camera.background_color &#061; BLACKBOARD_GREEN<br \/>\n        self.set_camera_orientation(<br \/>\n            phi&#061;70 * DEGREES, theta&#061;-35 * DEGREES, zoom&#061;0.85<br \/>\n        )<\/p>\n<p>        # &#8212;&#8212;&#8212;&#8212;&#8212;- 2D \u6587\u672c\u4e0e\u516c\u5f0f (\u56fa\u5b9a\u5728\u5c4f\u5e55\u4e0a) &#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>        # \u6807\u9898 (\u9876\u90e8\u4e2d\u592e) &#8211; \u4f7f\u7528 Text \u4ee5\u5b8c\u7f8e\u652f\u6301\u4e2d\u6587<br \/>\n        title &#061; Text(<br \/>\n            &#034;\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u65b9\u7a0b\u4e0e\u5750\u6807\u53d8\u6362&#034;,<br \/>\n            font&#061;&#034;Sans&#034;,<br \/>\n            color&#061;YELLOW,<br \/>\n        ).scale(0.7)<br \/>\n        title.to_edge(UP, buff&#061;0.4)<\/p>\n<p>        # \u89d2\u843d (1): \u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u53c2\u6570\u65b9\u7a0b (\u5de6\u4e0a\u89d2)<br \/>\n        label1 &#061; Text(&#034;&#xff08;1&#xff09;\u83ab\u6bd4\u4e4c\u65af\u5e26\u53c2\u6570\u65b9\u7a0b&#xff1a;&#034;, font&#061;&#034;Sans&#034;, color&#061;WHITE).scale(0.35)<br \/>\n        eq1 &#061; MathTex(<br \/>\n            r&#034;x &#061; \\\\left( R &#043; v \\\\cos\\\\frac{u}{2} \\\\right) \\\\cos u\\\\\\\\&#034;,<br \/>\n            r&#034;y &#061; \\\\left( R &#043; v \\\\cos\\\\frac{u}{2} \\\\right) \\\\sin u\\\\\\\\&#034;,<br \/>\n            r&#034;z &#061; v \\\\sin\\\\frac{u}{2}&#034;,<br \/>\n            color&#061;WHITE,<br \/>\n        ).scale(0.55)<br \/>\n        group1 &#061; VGroup(label1, eq1).arrange(DOWN, aligned_edge&#061;LEFT, buff&#061;0.1)<br \/>\n        group1.to_corner(UL).shift(DOWN * 0.8)<\/p>\n<p>        # \u89d2\u843d (2): \u6781\u5750\u6807\u4e0e\u76f4\u89d2\u5750\u6807\u7684\u8f6c\u6362 (\u53f3\u4e0a\u89d2)<br \/>\n        label2 &#061; Text(&#034;&#xff08;2&#xff09;\u6781\u5750\u6807\u4e0e\u76f4\u89d2\u5750\u6807\u8f6c\u6362&#xff1a;&#034;, font&#061;&#034;Sans&#034;, color&#061;LIGHT_GRAY).scale(0.35)<br \/>\n        eq2 &#061; MathTex(<br \/>\n            r&#034;r &#061; R &#043; v \\\\cos\\\\frac{u}{2}\\\\\\\\&#034;,<br \/>\n            r&#034;x &#061; r \\\\cos u\\\\\\\\&#034;,<br \/>\n            r&#034;y &#061; r \\\\sin u&#034;,<br \/>\n            color&#061;LIGHT_GRAY,<br \/>\n        ).scale(0.55)<br \/>\n        group2 &#061; VGroup(label2, eq2).arrange(DOWN, aligned_edge&#061;LEFT, buff&#061;0.1)<br \/>\n        group2.to_corner(UR).shift(DOWN * 0.8)<\/p>\n<p>        # \u89d2\u843d (3): \u7ed9\u5b9a\u6570\u5b57\u7684\u5177\u4f53\u8ba1\u7b97 (\u5de6\u4e0b\u89d2)<br \/>\n        label3 &#061; Text(&#034;&#xff08;3&#xff09;\u5b9e\u4f8b\u6570\u503c\u8ba1\u7b97&#xff1a;&#034;, font&#061;&#034;Sans&#034;, color&#061;ORANGE).scale(0.35)<br \/>\n        eq3 &#061; MathTex(<br \/>\n            r&#034;\\\\text{if} R &#061; 2.5, u &#061; \\\\pi, v &#061; 0.5\\\\\\\\&#034;,<br \/>\n            r&#034;r &#061; 2.5 &#043; 0.5 \\\\cos(\\\\frac{\\\\pi}{2}) &#061; 2.5\\\\\\\\&#034;,<br \/>\n            r&#034;x &#061; 2.5 \\\\cos(\\\\pi) &#061; -2.5\\\\\\\\&#034;,<br \/>\n            r&#034;y &#061; 2.5 \\\\sin(\\\\pi) &#061; 0\\\\\\\\&#034;,<br \/>\n            r&#034;z &#061; 0.5 \\\\sin(\\\\frac{\\\\pi}{2}) &#061; 0.5&#034;,<br \/>\n            color&#061;ORANGE,<br \/>\n        ).scale(0.55)<br \/>\n        group3 &#061; VGroup(label3, eq3).arrange(DOWN, aligned_edge&#061;LEFT, buff&#061;0.1)<br \/>\n        group3.to_corner(DL).shift(UP * 0.3)<\/p>\n<p>        # \u4f7f\u7528 add_fixed_in_frame_mobjects \u786e\u4fdd 2D \u5143\u7d20\u4e0d\u968f 3D \u76f8\u673a\u65cb\u8f6c<br \/>\n        self.add_fixed_in_frame_mobjects(title, group1, group2, group3)<\/p>\n<p>        # &#8212;&#8212;&#8212;&#8212;&#8212;- 3D \u51e0\u4f55\u4f53\u4e0e\u52a8\u753b &#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>        # \u521b\u5efa\u6e10\u53d8\u8272\u4e09\u7ef4\u5750\u6807\u8f74<br \/>\n        axes &#061; ThreeDAxes(<br \/>\n            x_range&#061;[-4, 4, 1],<br \/>\n            y_range&#061;[-4, 4, 1],<br \/>\n            z_range&#061;[-3, 3, 1],<br \/>\n            x_length&#061;7,<br \/>\n            y_length&#061;7,<br \/>\n            z_length&#061;5,<br \/>\n        ).shift(<br \/>\n            DOWN * 0.3<br \/>\n        )  # \u7a0d\u5fae\u5411\u4e0b\u79fb\u52a8\u4ee5\u907f\u514d\u91cd\u53e0\u516c\u5f0f<br \/>\n        for axis in [axes.x_axis, axes.y_axis, axes.z_axis]:<br \/>\n            axis.set_color(color&#061;[RED, WHITE, RED])<\/p>\n<p>        # \u53c2\u6570\u5316\u83ab\u6bd4\u4e4c\u65af\u5e26\u51fd\u6570<br \/>\n        R &#061; 2.5<\/p>\n<p>        def mobius_func(u, v):<br \/>\n            x &#061; (R &#043; v * np.cos(u \/ 2)) * np.cos(u)<br \/>\n            y &#061; (R &#043; v * np.cos(u \/ 2)) * np.sin(u)<br \/>\n            z &#061; v * np.sin(u \/ 2)<br \/>\n            # \u540c\u6837\u5e94\u7528\u5e73\u79fb\u4ee5\u548c\u5750\u6807\u8f74\u5bf9\u9f50<br \/>\n            return np.array([x, y, z]) &#043; DOWN * 0.3<\/p>\n<p>        # \u521b\u5efa\u4e03\u6761\u4e0d\u900f\u660e\u7684\u5e73\u884c\u8272\u5e26<br \/>\n        colors &#061; [RED, ORANGE, YELLOW, GREEN, TEAL, BLUE, PURPLE]<br \/>\n        num_strips &#061; 7<br \/>\n        total_width &#061; 1.0<br \/>\n        strip_width &#061; total_width \/ num_strips<\/p>\n<p>        strips &#061; VGroup()<br \/>\n        for i, color in enumerate(colors):<br \/>\n            v_min &#061; -total_width \/ 2 &#043; i * strip_width<br \/>\n            v_max &#061; v_min &#043; strip_width<\/p>\n<p>            strip &#061; Surface(<br \/>\n                lambda u, v, v_min&#061;v_min, v_max&#061;v_max: mobius_func(u, v),<br \/>\n                u_range&#061;[0, 2 * np.pi],<br \/>\n                v_range&#061;[v_min, v_max],<br \/>\n                resolution&#061;(60, 2),<br \/>\n            )<br \/>\n            strip.set_fill(color&#061;color, opacity&#061;1.0)<br \/>\n            strip.set_stroke(width&#061;0)<br \/>\n            strips.add(strip)<\/p>\n<p>        # \u5b9a\u4e49 3 \u4e2a\u201c\u8682\u8681\u201d (\u9002\u914d v0.19.0)<br \/>\n        ant_sphere &#061; Sphere(radius&#061;0.15).set_color(RED)<br \/>\n        ant_cube &#061; Cube(side_length&#061;0.25).set_color(GREEN)<br \/>\n        ant_tetra &#061; Tetrahedron(<br \/>\n            edge_length&#061;0.3,<br \/>\n            faces_config&#061;{&#034;fill_color&#034;: BLUE, &#034;fill_opacity&#034;: 1.0},<br \/>\n        )<br \/>\n        ant_tetra.graph.set_color(BLUE)<\/p>\n<p>        ants &#061; [ant_sphere, ant_cube, ant_tetra]<\/p>\n<p>        def get_ant_position(alpha, index):<br \/>\n            base_u &#061; alpha * 4 * np.pi<br \/>\n            offset &#061; index * (4 * np.pi \/ 3)<br \/>\n            u &#061; (base_u &#043; offset) % (4 * np.pi)<br \/>\n            return mobius_func(u, 0)<\/p>\n<p>        # &#8212;&#8212;&#8212;&#8212;&#8212;- \u52a8\u753b\u64ad\u653e &#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>        # 1. \u6e10\u663e\u6807\u9898\u548c\u516c\u5f0f\u7ec4<br \/>\n        self.play(<br \/>\n            Write(title),<br \/>\n            FadeIn(group1, shift&#061;RIGHT),<br \/>\n            FadeIn(group2, shift&#061;LEFT),<br \/>\n            FadeIn(group3, shift&#061;UP),<br \/>\n            run_time&#061;2,<br \/>\n        )<br \/>\n        self.wait(0.5)<\/p>\n<p>        # 2. \u7ed8\u5236\u5750\u6807\u8f74<br \/>\n        self.play(Create(axes), run_time&#061;2)<br \/>\n        self.wait(0.5)<\/p>\n<p>        # 3. \u8272\u5e26\u8d5b\u8dd1<br \/>\n        rate_functions &#061; [<br \/>\n            rate_funcs.smooth,<br \/>\n            rate_funcs.ease_in_quad,<br \/>\n            rate_funcs.ease_out_quad,<br \/>\n            rate_funcs.linear,<br \/>\n            rate_funcs.ease_in_out_cubic,<br \/>\n            rate_funcs.ease_in_sine,<br \/>\n            rate_funcs.ease_out_sine,<br \/>\n        ]<\/p>\n<p>        strip_animations &#061; []<br \/>\n        for i, strip in enumerate(strips):<br \/>\n            strip_animations.append(<br \/>\n                Create(<br \/>\n                    strip,<br \/>\n                    rate_func&#061;rate_functions[i],<br \/>\n                    run_time&#061;6,<br \/>\n                )<br \/>\n            )<\/p>\n<p>        self.play(*strip_animations)<br \/>\n        self.wait(0.5)<\/p>\n<p>        # 4. \u76f8\u673a\u4e0e\u573a\u666f\u65cb\u8f6c (\u6b64\u65f6\u5c4f\u5e55\u89d2\u843d\u7684\u516c\u5f0f\u4fdd\u6301\u4e0d\u52a8)<br \/>\n        self.begin_ambient_camera_rotation(rate&#061;0.4)<br \/>\n        self.play(<br \/>\n            Rotate(axes, angle&#061;2 * np.pi, axis&#061;OUT),<br \/>\n            Rotate(strips, angle&#061;2 * np.pi, axis&#061;OUT),<br \/>\n            run_time&#061;4,<br \/>\n            rate_func&#061;rate_funcs.linear,<br \/>\n        )<br \/>\n        self.stop_ambient_camera_rotation()<br \/>\n        self.wait(0.5)<\/p>\n<p>        # 5. \u8682\u8681\u722c\u884c<br \/>\n        for i, ant in enumerate(ants):<br \/>\n            ant.move_to(get_ant_position(0, i))<br \/>\n        self.play(*[FadeIn(ant) for ant in ants])<\/p>\n<p>        def update_ant(ant, alpha, index):<br \/>\n            ant.move_to(get_ant_position(alpha, index))<br \/>\n            ant.rotate(<br \/>\n                0.15, axis&#061;np.array([1, 1, 1]), about_point&#061;ant.get_center()<br \/>\n            )<\/p>\n<p>        self.play(<br \/>\n            UpdateFromAlphaFunc(<br \/>\n                ant_sphere,<br \/>\n                lambda m, a: update_ant(m, a, 0),<br \/>\n            ),<br \/>\n            UpdateFromAlphaFunc(<br \/>\n                ant_cube,<br \/>\n                lambda m, a: update_ant(m, a, 1),<br \/>\n            ),<br \/>\n            UpdateFromAlphaFunc(<br \/>\n                ant_tetra,<br \/>\n                lambda m, a: update_ant(m, a, 2),<br \/>\n            ),<br \/>\n            run_time&#061;10,<br \/>\n            rate_func&#061;rate_funcs.linear,<br \/>\n        )<\/p>\n<p>        self.wait(2)<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u4f7f\u7528Manim\u5e93\u521b\u5efa\u4e86\u4e00\u4e2a3D\u52a8\u753b&#xff0c;\u5c55\u793a\u4e86\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027\u3002\u8ba9\u6211\u8be6\u7ec6\u89e3\u91ca\u4ee3\u7801\u7684\u5404\u4e2a\u90e8\u5206&#xff1a;<\/p>\n<h3>\u4e3b\u8981\u529f\u80fd\u6982\u8ff0<\/h3>\n<p>\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u83ab\u6bd4\u4e4c\u65af\u5e26&#xff08;Mobius strip&#xff09;\u76843D\u6570\u5b66\u6f14\u793a\u52a8\u753b&#xff0c;\u5305\u542b&#xff1a;<\/p>\n<li>\u6570\u5b66\u516c\u5f0f\u5c55\u793a<\/li>\n<li>3D\u51e0\u4f55\u4f53\u6784\u5efa<\/li>\n<li>\u591a\u5143\u7d20\u52a8\u753b\u540c\u6b65<\/li>\n<li>\u76f8\u673a\u8fd0\u52a8\u63a7\u5236<\/li>\n<h3>\u4ee3\u7801\u7ed3\u6784\u8be6\u89e3<\/h3>\n<h4>1. \u573a\u666f\u8bbe\u7f6e<\/h4>\n<p>self.camera.background_color &#061; BLACKBOARD_GREEN<br \/>\nself.set_camera_orientation(phi&#061;70 * DEGREES, theta&#061;-35 * DEGREES, zoom&#061;0.85)<\/p>\n<ul>\n<li>\u8bbe\u7f6e\u9ed1\u7eff\u8272\u80cc\u666f&#xff08;\u9ed1\u677f\u98ce\u683c&#xff09;<\/li>\n<li>\u8c03\u65743D\u76f8\u673a\u521d\u59cb\u89d2\u5ea6\u548c\u7f29\u653e<\/li>\n<\/ul>\n<h4>2. 2D\u6587\u672c\u4e0e\u516c\u5f0f&#xff08;\u56fa\u5b9a\u5728\u5c4f\u5e55&#xff09;<\/h4>\n<p>\u4f7f\u7528add_fixed_in_frame_mobjects\u57283D\u573a\u666f\u4e2d\u56fa\u5b9a2D\u5143\u7d20&#xff1a;<\/p>\n<ul>\n<li>\u5de6\u4e0a&#xff1a;\u83ab\u6bd4\u4e4c\u65af\u5e26\u53c2\u6570\u65b9\u7a0b<\/li>\n<li>\u53f3\u4e0a&#xff1a;\u6781\u5750\u6807\u4e0e\u76f4\u89d2\u5750\u6807\u8f6c\u6362<\/li>\n<li>\u5de6\u4e0b&#xff1a;\u5177\u4f53\u6570\u503c\u8ba1\u7b97\u793a\u4f8b<\/li>\n<li>\u9876\u90e8&#xff1a;\u6807\u9898<\/li>\n<\/ul>\n<p>\u5373\u4f7f3D\u573a\u666f\u65cb\u8f6c&#xff0c;\u8fd9\u4e9b2D\u5143\u7d20\u59cb\u7ec8\u9762\u5411\u6444\u50cf\u673a\u3002<\/p>\n<h4>3. \u83ab\u6bd4\u4e4c\u65af\u5e26\u76843D\u6784\u5efa<\/h4>\n<p>def mobius_func(u, v):<br \/>\n    x &#061; (R &#043; v * np.cos(u \/ 2)) * np.cos(u)<br \/>\n    y &#061; (R &#043; v * np.cos(u \/ 2)) * np.sin(u)<br \/>\n    z &#061; v * np.sin(u \/ 2)<\/p>\n<p>\u8fd9\u662f\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6807\u51c6\u53c2\u6570\u65b9\u7a0b&#xff0c;\u5176\u4e2d&#xff1a;<\/p>\n<ul>\n<li>u&#xff1a;\u7ed5\u73af\u89d2\u5ea6&#xff08;0\u52302\u03c0&#xff09;<\/li>\n<li>v&#xff1a;\u5e26\u5bbd\u5ea6\u65b9\u5411&#xff08;-0.5\u52300.5&#xff09;<\/li>\n<li>\u901a\u8fc7v * cos(u\/2)\u548cv * sin(u\/2)\u5b9e\u73b0\u534a\u626d\u8f6c<\/li>\n<\/ul>\n<h4>4. \u4e03\u8272\u5e26\u6784\u5efa<\/h4>\n<p>\u5c06\u83ab\u6bd4\u4e4c\u65af\u5e26\u5206\u5272\u62107\u4e2a\u4e0d\u540c\u989c\u8272\u7684\u5e73\u884c\u6761\u5e26&#xff0c;\u6bcf\u4e2a\u6761\u5e26\u4f7f\u7528\u4e0d\u540c\u7684\u52a8\u753b\u901f\u7387\u51fd\u6570\u3002<\/p>\n<h4>5. \u52a8\u753b\u987a\u5e8f<\/h4>\n<li>\u6807\u9898\u548c\u516c\u5f0f\u6e10\u663e&#xff08;2\u79d2&#xff09;<\/li>\n<li>\u7ed8\u5236\u5750\u6807\u8f74&#xff08;2\u79d2&#xff09;<\/li>\n<li>\u6761\u5e26\u52a8\u753b&#xff08;6\u79d2&#xff09;- \u4f7f\u7528\u4e0d\u540c\u901f\u7387\u51fd\u6570<\/li>\n<li>\u573a\u666f\u65cb\u8f6c&#xff08;4\u79d2&#xff09;&#xff1a;\u76f8\u673a\u81ea\u52a8\u65cb\u8f6c&#043;\u573a\u666f\u6574\u4f53\u65cb\u8f6c<\/li>\n<li>\u8682\u8681\u52a8\u753b&#xff08;10\u79d2&#xff09;&#xff1a;3\u53ea&#034;\u8682\u8681&#034;\u5728\u5e26\u4e0a\u884c\u8d70<\/li>\n<h4>6. \u8682\u8681\u52a8\u753b<\/h4>\n<ul>\n<li>\u7ea2\u7403&#xff08;Sphere&#xff09;<\/li>\n<li>\u7eff\u65b9\u5757&#xff08;Cube&#xff09;<\/li>\n<li>\u84dd\u56db\u9762\u4f53&#xff08;Tetrahedron&#xff09;<\/li>\n<\/ul>\n<p>\u901a\u8fc7UpdateFromAlphaFunc\u66f4\u65b0\u4f4d\u7f6e&#xff0c;\u4f7f\u7528\u56fa\u5b9a\u504f\u79fb\u5b9e\u73b0\u7b49\u95f4\u8ddd\u5206\u5e03\u3002<\/p>\n<h3>\u5173\u952e\u6280\u672f\u70b9<\/h3>\n<h4>\u4e0d\u540c\u901f\u7387\u51fd\u6570<\/h4>\n<p>rate_functions &#061; [<br \/>\n    rate_funcs.smooth,       # \u5e73\u6ed1<br \/>\n    rate_funcs.ease_in_quad,  # \u4e8c\u6b21\u7f13\u5165<br \/>\n    rate_funcs.ease_out_quad, # \u4e8c\u6b21\u7f13\u51fa<br \/>\n    rate_funcs.linear,        # \u7ebf\u6027<br \/>\n    rate_funcs.ease_in_out_cubic, # \u4e09\u6b21\u7f13\u5165\u7f13\u51fa<br \/>\n    rate_funcs.ease_in_sine,  # \u6b63\u5f26\u7f13\u5165<br \/>\n    rate_funcs.ease_out_sine, # \u6b63\u5f26\u7f13\u51fa<br \/>\n]<\/p>\n<p>\u6bcf\u4e2a\u6761\u5e26\u4f7f\u7528\u4e0d\u540c\u901f\u5ea6\u66f2\u7ebf&#xff0c;\u5c55\u793a\u76f8\u540c\u51e0\u4f55\u4f53\u5728\u4e0d\u540c\u8fd0\u52a8\u5b66\u4e0b\u7684\u6548\u679c\u3002<\/p>\n<h4>3D\u52302D\u7684\u8f6c\u6362<\/h4>\n<ul>\n<li>\u4f7f\u7528add_fixed_in_frame_mobjects\u56fa\u5b9a\u5c4f\u5e55\u5143\u7d20<\/li>\n<li>3D\u5143\u7d20\u6b63\u5e38\u53c2\u4e0e\u7a7a\u95f4\u53d8\u6362<\/li>\n<li>\u76f8\u673a\u89d2\u5ea6\u53d8\u5316\u4e0d\u5f71\u54cd\u56fa\u5b9a\u76842D\u5143\u7d20<\/li>\n<\/ul>\n<h4>\u53c2\u6570\u65b9\u7a0b\u7684\u5e94\u7528<\/h4>\n<ul>\n<li>\u4ee3\u7801\u540c\u65f6\u5c55\u793a\u4e86\u6570\u5b66\u7406\u8bba\u548c3D\u5b9e\u73b0<\/li>\n<li>\u6240\u67093D\u51e0\u4f55\u4f53\u7531\u53c2\u6570\u65b9\u7a0b\u751f\u6210<\/li>\n<li>\u901a\u8fc7\u6539\u53d8\u53c2\u6570\u4ea7\u751f\u52a8\u753b\u6548\u679c<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>import numpy as np<br \/>\nfrom manim import *<br \/>\nimport manim.utils.rate_functions as rate_funcs# \u5b9a\u4e49\u9ed1\u677f\u7684\u9ed1\u7eff\u8272<br \/>\nBLACKBOARD_GREEN  \\&#8221;#1E352F\\&#8221;class MobiusRaceScene04(ThreeDScene):def construct(self):# 1. \u8bbe\u7f6e\u9ed1\u677f\u80cc\u666f\u8272\u548c\u521d\u59cb\u76f8\u673a\u89c6\u89d2self.camera.background_color  BLACKBOARD<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10187,10979,10980,81,1482],"topic":[],"class_list":["post-95936","post","type-post","status-publish","format-standard","hentry","category-server","tag-codingplan","tag-manim","tag-10980","tag-python","tag-1482"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/95936.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"import numpy as np from manim import * import manim.utils.rate_functions as rate_funcs# \u5b9a\u4e49\u9ed1\u677f\u7684\u9ed1\u7eff\u8272 BLACKBOARD_GREEN &quot;#1E352F&quot;class MobiusRaceScene04(ThreeDScene):def construct(self):# 1. \u8bbe\u7f6e\u9ed1\u677f\u80cc\u666f\u8272\u548c\u521d\u59cb\u76f8\u673a\u89c6\u89d2self.camera.background_color BLACKBOARD\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/95936.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-26T19:48:37+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/95936.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/95936.html\",\"name\":\"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-26T19:48:37+00:00\",\"dateModified\":\"2026-08-26T19:48:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/95936.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/95936.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/95936.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/95936.html","og_locale":"zh_CN","og_type":"article","og_title":"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"import numpy as np from manim import * import manim.utils.rate_functions as rate_funcs# \u5b9a\u4e49\u9ed1\u677f\u7684\u9ed1\u7eff\u8272 BLACKBOARD_GREEN \"#1E352F\"class MobiusRaceScene04(ThreeDScene):def construct(self):# 1. \u8bbe\u7f6e\u9ed1\u677f\u80cc\u666f\u8272\u548c\u521d\u59cb\u76f8\u673a\u89c6\u89d2self.camera.background_color BLACKBOARD","og_url":"https:\/\/www.wsisp.com\/helps\/95936.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-26T19:48:37+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/95936.html","url":"https:\/\/www.wsisp.com\/helps\/95936.html","name":"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-26T19:48:37+00:00","dateModified":"2026-08-26T19:48:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/95936.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/95936.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/95936.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u83ab\u6bd4\u4e4c\u65af\u5e26\u7684\u6570\u5b66\u539f\u7406\u548c\u89c6\u89c9\u7279\u6027"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/95936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=95936"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/95936\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=95936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=95936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=95936"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=95936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}