Image

Espiral en forma de colina. Hecho en Manim

Función Sombrero Mexicano

from manim import *

class Espiral(ThreeDScene):
    def construct(self):
        cielo = "#C4DDFF"
        purpura = "#800080"
        self.camera.background_color = cielo
        axes = ThreeDAxes().set_color("#800080")
        hoja1 = ParametricFunction(
            lambda u: np.array([
                0.05305 * u * np.cos(3 * u),
                0.05305 * u * np.sin(3 * u),
                1-0.0028144*u*u
            ]),
            color="#000080", t_range=np.array([0, 31.41, 0.01])
        ).set_shade_in_3d(True)
        self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)

        self.play(
            Write(axes),
        )

        self.play(
            Write(hoja1),
        )
        self.begin_ambient_camera_rotation(rate=0.10)
        namex = MathTex("x=\theta \cos(3\theta)").move_to(np.array([0, 0, 2.7])).set_color(BLACK).flip(np.array([0, 1, 1]))
        namey = MathTex("y=\theta \sin(3\theta)").move_to(np.array([0, 0, 2.0])).set_color(BLACK).flip(np.array([0, 1, 1]))
        namez = MathTex("z=1-\theta^2").move_to(np.array([0, 0, 1.3])).set_color(BLACK).flip(np.array([0, 1, 1]))
        self.play(
            Write(namex),
            Write(namey),
            Write(namez),
                )
        self.wait(30)

© Profesor Favián Arenas. 2023. Diseñado por HTML Codex