Skip to main content
Home
Jhun Vert

Main navigation

Breadcrumb

  1. Home
  2. Manim

Create Spherical Zone With Manim

Monday, November 2, 2020

Radius of sphere = 4
Render method= Write

from manimlib.imports import *

class SphericalZone(ThreeDScene):
    def construct(self):
        xyz = ThreeDAxes()
        SphereZone = ParametricSurface(
            self.SphereZoneEq,
            u_min=0,
            u_max=TAU,
            v_min=-PI/12,
            v_max=PI/6,
            resolution=(50,10)
        ).set_fill(opacity=0.8)

        self.set_camera_orientation(phi=60 * DEGREES)
        self.begin_ambient_camera_rotation(rate=0.2)

        self.play(ShowCreation(xyz), run_time=1.5)
        self.play(Write(SphereZone), run_time=3)
        self.wait(8)
    
    def SphereZoneEq(self, u, v):
        return [ 
            4*np.cos(v)*np.cos(u),
            4*np.cos(v)*np.sin(u),
            4*np.sin(v)
        ]

Output video:

Category
Manim

Tags

  • 3Blue1Brown
  • Spherical Zone
  • ParametricSurface
  • ThreeDScene
  • set_camera_orientation
  • begin_ambient_camera_rotation
  • Python
  • Add new comment

Comments

More in Manim

  • How to install Manim CE in Mac OS
  • Update the value of a function in Manim
  • Tracing a portion of a graph and moves along that portion using Manim updater
  • Creating a Circle Using Parametric Equations With Manim
  • Create Spherical Zone With Manim
  • Create a Partial Cylindrical Surface With Manim
  • Commands on Rendering Manim Videos: 3Blue1Brown vs ManimCE
more
               
Jhun Vert
About
Disclaimer
Privacy Policy
Projects
Contact
MATHalino
Website
YouTube
Twitter
FaceBook
Instagram
Powered by Drupal