NameError: name 'ParametricSurface' is not defined %%manim -ql -v WARNING MobiusStrip…
- User
NameError: name 'ParametricSurface' is not defined
%%manim -ql -v WARNING MobiusStrip """ Example 3: Parametric Surface Plotting This example plots a parametric surface, such as a Möbius strip. NameError: name 'ParametricSurface' is not defined """ class MobiusStrip(ThreeDScene): def construct(self): # Set up camera self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
# Define the parametric surface mobius = ParametricSurface( lambda u, v: np.array([ (1 + (v/2)*np.cos(u/2)) * np.cos(u), (1 + (v/2)*np.cos(u/2)) * np.sin(u), (v/2)*np.sin(u/2) ]), u_range=[0, TAU], v_range=[-1, 1], checkerboard_colors=[BLUE_D, BLUE_E], resolution=(15, 32) ) # Add surface to scene self.add(mobius) self.begin_ambient_camera_rotation(rate=0.2) self.wait(10) - Assistant