Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
project_toon_cse457
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shiven Bhatt
project_toon_cse457
Commits
ff7e5cf5
Commit
ff7e5cf5
authored
2 years ago
by
Ethan Fisher
Browse files
Options
Downloads
Patches
Plain Diff
anims
parent
cc9dc259
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
video.py
+15
-15
15 additions, 15 deletions
video.py
with
15 additions
and
15 deletions
video.py
+
15
−
15
View file @
ff7e5cf5
...
@@ -31,23 +31,23 @@ class Slides(Scene):
...
@@ -31,23 +31,23 @@ class Slides(Scene):
and all kinds of dirty tricks to accomplish things that depend on nonlocal effects.”
and all kinds of dirty tricks to accomplish things that depend on nonlocal effects.”
- (stackexchange guru joojaa)
- (stackexchange guru joojaa)
'''
'''
slides
=
[
slides
=
[
### INTRODUCTION ###
### INTRODUCTION ###
# title slide here
# title slide here
Slide
([
self
.
get_image_group
([
"
raster_vs_raytrace.webp
"
])],
[
8
]),
Slide
([
self
.
get_image_group
([
"
raster_vs_raytrace.webp
"
])],
[
8
]),
### RASTERIZATION ###
### RASTERIZATION ###
# rasterization animation here
# rasterization animation here
[34]
### PROBLEMS ####
### PROBLEMS ####
get_sphere_slide
(
"
sad_sphere.png
"
,
"
\"
I
'
m not smooth
\"
:(
"
,
[
1
,
1
]),
get_sphere_slide
(
"
sad_sphere.png
"
,
"
\"
I
'
m not smooth
\"
:(
"
,
[
3
,
7
]),
Slide
([
self
.
get_image_group
([
"
shadow.png
"
,
"
glass.png
"
])],
[
1
]),
Slide
([
self
.
get_image_group
([
"
shadow.png
"
,
"
glass.png
"
])],
[
25
]),
Slide
([
Text
(
guru_text
,
color
=
"
white
"
,
font_size
=
20
)],
[
1
]),
Slide
([
Text
(
guru_text
,
color
=
"
white
"
,
font_size
=
20
)],
[
1
8
]),
### RAYTRACING ###
### RAYTRACING ###
# raytracing animation goes here
# raytracing animation goes here
[15]
Slide
([
self
.
get_image_group
([
"
different_materials.png
"
])],
[
1
]),
Slide
([
self
.
get_image_group
([
"
different_materials.png
"
])],
[
7
]),
### PHYSICS ###
### PHYSICS ###
Slide
([
self
.
get_image_group
([
"
vindow_light_transfer.jpg
"
])],
[
1
]),
Slide
([
self
.
get_image_group
([
"
vindow_light_transfer.jpg
"
])],
[
1
]),
...
@@ -119,8 +119,8 @@ class Title(Scene):
...
@@ -119,8 +119,8 @@ class Title(Scene):
self
.
play
(
FadeIn
(
t1
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
self
.
play
(
FadeIn
(
t1
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
self
.
play
(
FadeIn
(
t3
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
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
.
play
(
FadeIn
(
t4
),
lag_ratio
=
0.1
,
run_time
=
0.5
)
self
.
wait
(
3
)
self
.
wait
(
1.5
)
self
.
play
(
FadeOut
(
t0
,
t1
,
t3
,
t4
))
self
.
play
(
FadeOut
(
t0
,
t1
,
t3
,
t4
)
,
lag_ratio
=
0.1
,
run_time
=
0.5
)
class
RasterizationTriangleScene
(
ThreeDScene
):
class
RasterizationTriangleScene
(
ThreeDScene
):
def
construct
(
self
):
def
construct
(
self
):
...
@@ -172,10 +172,10 @@ class RaytracingScene(Scene):
...
@@ -172,10 +172,10 @@ class RaytracingScene(Scene):
lightbulb
=
ImageMobject
(
"
lightbulb.png
"
)
lightbulb
=
ImageMobject
(
"
lightbulb.png
"
)
lightbulb
.
shift
([
-
0.75
,
-
3.5
,
0
])
lightbulb
.
shift
([
-
0.75
,
-
3.5
,
0
])
self
.
add
(
lightbulb
)
self
.
add
(
lightbulb
)
self
.
play
(
Create
(
square
),
run_time
=
0.5
)
self
.
play
(
Create
(
square
),
run_time
=
1
)
self
.
play
(
Create
(
circle
),
run_time
=
0.5
)
self
.
play
(
Create
(
circle
),
run_time
=
1
)
self
.
play
(
Create
(
triangle
),
run_time
=
0.5
)
self
.
play
(
Create
(
triangle
),
run_time
=
1
)
self
.
wait
(
1
)
self
.
wait
(
3
)
light_rays
=
[
light_rays
=
[
...
@@ -186,7 +186,7 @@ class RaytracingScene(Scene):
...
@@ -186,7 +186,7 @@ class RaytracingScene(Scene):
]
]
for
ray
in
light_rays
:
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment