Commit 9310272a authored by Shiven Bhatt's avatar Shiven Bhatt
Browse files

add normal and camera plane text

parent 7cea45bd
......@@ -68,15 +68,27 @@ class RasterizationTriangleScene(ThreeDScene):
rect.shift([-1, 0, -4])
self.add(rect)
self.add(cube)
camera_plane = Text("camera plane",color="white",font_size=30)
camera_plane.shift([1.5, 3, -4])
self.add(camera_plane)
self.wait(1)
Line3D(start=[], end=[])
normal = Line3D(start=[0.25, 0.25, 0], end=[0.25, 0.25, -1])
normal.shift([-0.5, -0.5, 2.5])
triangle = Polygon([0, 0, 0], [0, 1, 0], [1, 0, 0], stroke_width = 1, stroke_color=RED)
triangle.shift([-0.5, -0.5, 2.5])
self.play(Create(triangle))
self.play(Create(normal))
self.wait(1)
plane_triangle = Polygon([0, 0, 0], [0, 0.7, 0], [0.7, 0, 0], stroke_width = 1, stroke_color=RED)
plane_triangle.shift([-0.35, -0.35, -4])
remain_triangle = Polygon([0, 0, 0], [0, 1, 0], [1, 0, 0], stroke_width = 1, stroke_color=RED)
remain_triangle.shift([-0.5, -0.5, 2.5])
self.add(remain_triangle)
self.play(Transform(triangle, plane_triangle))
self.wait(1)
self.move_camera(phi=PI, theta=0, gamma= PI / 2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment