Skip to content

solid of revolution on manim #1468

Answered by TonyCrane
Alessandromart asked this question in Q&A
Discussion options

You must be logged in to vote
class Code1468(Scene):
    def construct(self):
        curve = lambda y: [0, y, (-(1 / 25) * y ** 2) + 4] 
        surface_func = lambda u, v: np.dot(curve(v), rotation_matrix(u, UP).T)
        surface = ParametricSurface(
            surface_func, u_range=(0, TAU), v_range=(-5, 5),
            checkerboard_colors=None, fill_color=YELLOW_D, fill_opacity=0.8,
            stroke_color=WHITE, stroke_width=2.5
        )
        self.add(surface)

Is this what you want?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TonyCrane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants