Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shiven Bhatt
project_toon_cse457
Commits
5d7f0954
Commit
5d7f0954
authored
May 04, 2022
by
Shiven Bhatt
Browse files
merge
parents
6ade2130
ff7e5cf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
video.py
View file @
5d7f0954
...
...
@@ -31,14 +31,14 @@ class Slides(Scene):
and all kinds of dirty tricks to accomplish things that depend on nonlocal effects.”
- (stackexchange guru joojaa)
'''
slides
=
[
### INTRODUCTION ###
# title slide here
Slide
([
self
.
get_image_group
([
"raster_vs_raytrace.webp"
])],
[
8
]),
### RASTERIZATION ###
# rasterization animation here
# rasterization animation here
[34]
### PROBLEMS ####
get_sphere_slide
(
"sad_sphere.png"
,
"
\"
I'm not smooth
\"
:("
,
[
3
,
7
]),
...
...
@@ -46,8 +46,8 @@ class Slides(Scene):
Slide
([
Text
(
guru_text
,
color
=
"white"
,
font_size
=
20
)],
[
18
]),
### RAYTRACING ###
# raytracing animation goes here
Slide
([
self
.
get_image_group
([
"different_materials.png"
])],
[
1
]),
# raytracing animation goes here
[15]
Slide
([
self
.
get_image_group
([
"different_materials.png"
])],
[
7
]),
### PHYSICS ###
Slide
([
self
.
get_image_group
([
"vindow_light_transfer.jpg"
])],
[
1
]),
...
...
@@ -120,7 +120,7 @@ class Title(Scene):
self
.
play
(
FadeIn
(
t3
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
self
.
play
(
FadeIn
(
t4
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
self
.
wait
(
1.5
)
self
.
play
(
FadeOut
(
t0
,
t1
,
t3
,
t4
),
run_time
=
0.5
)
self
.
play
(
FadeOut
(
t0
,
t1
,
t3
,
t4
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
class
RasterizationTriangleScene
(
ThreeDScene
):
def
construct
(
self
):
...
...
@@ -172,11 +172,10 @@ class RaytracingScene(Scene):
lightbulb
=
ImageMobject
(
"lightbulb.png"
)
lightbulb
.
shift
([
-
0.75
,
-
3.5
,
0
])
self
.
add
(
lightbulb
)
self
.
play
(
Create
(
square
),
run_time
=
0.5
)
self
.
play
(
Create
(
circle
),
run_time
=
0.5
)
self
.
play
(
Create
(
triangle
),
run_time
=
0.5
)
self
.
wait
(
1
)
self
.
play
(
Create
(
square
),
run_time
=
1
)
self
.
play
(
Create
(
circle
),
run_time
=
1
)
self
.
play
(
Create
(
triangle
),
run_time
=
1
)
self
.
wait
(
3
)
light_rays
=
[
([
-
2
,
5
,
0
],
[
-
2
,
-
0.85
,
0
]),
...
...
@@ -186,7 +185,7 @@ class RaytracingScene(Scene):
]
for
ray
in
light_rays
:
self
.
play
(
Create
(
Line3D
(
start
=
ray
[
0
],
end
=
ray
[
1
],
color
=
YELLOW
)),
run_time
=
0.5
)
self
.
play
(
Create
(
Line3D
(
start
=
ray
[
0
],
end
=
ray
[
1
],
color
=
YELLOW
)),
run_time
=
1
)
self
.
wait
(
3
)
self
.
wait
(
5
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment