0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

wslでmanim その10

Posted at

概要

wslでmanimやってみた。
練習問題やってみた。

練習問題

3dグラフを書け。

成果物

test_ManimCE_v0.18.1.gif

サンプルコード



from manim import *

class test(ThreeDScene):
	def construct(self):
		sphere = Sphere()
		cube = Cube()
		prism = Prism()
		cylinder = Surface(lambda u, v: np.array([np.cos(TAU * v), np.sin(TAU * v), 1.0 * (1 - u)]), resolution = (6, 32))
		axes = ThreeDAxes()
		self.set_camera_orientation(phi = 75 * DEGREES, theta = 30 * DEGREES)
		self.add(axes)
		#self.play(ShowCreation(cube))
		self.add(cube)
		self.wait()
		self.remove(cube)
		#self.play(ShowCreation(sphere))
		self.add(sphere)
		self.wait()
		self.remove(sphere)
		#self.play(ShowCreation(prism))
		self.add(prism)
		self.wait()
		self.remove(prism)
		#self.play(ShowCreation(cylinder))
		self.add(cylinder)
		self.wait()




以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?