manim.mobject.three_dimensions.ParametricSurface

class ParametricSurface(func, u_min=0, u_max=1, v_min=0, v_max=1, resolution=32, surface_piece_config={}, fill_color='#29ABCA', fill_opacity=1.0, checkerboard_colors=['#29ABCA', '#236B8E'], stroke_color='#BBBBBB', stroke_width=0.5, should_make_jagged=False, pre_function_handle_to_anchor_scale_factor=1e-05, **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VGroup

Creates a Parametric Surface

Examples

Example: ParaSurface

../_images/ParaSurface-1.png
from manim import *

class ParaSurface(ThreeDScene):
    def func(self, u, v):
        return np.array([np.cos(u) * np.cos(v), np.cos(u) * np.sin(v), u])

    def construct(self):
        axes = ThreeDAxes(x_range=[-4,4], x_length=8)
        surface = ParametricSurface(
            lambda u, v: axes.c2p(*self.func(u, v)),
            u_min=-PI,
            u_max=PI,
            v_min=0,
            v_max=TAU,
        )
        self.set_camera_orientation(theta=70 * DEGREES, phi=75 * DEGREES)
        self.add(axes, surface)

Methods

get_u_values_and_v_values

set_fill_by_checkerboard

setup_in_uv_space

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.