Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dev_log
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Benjamin Koltes
dev_log
Commits
cc0404f8
Commit
cc0404f8
authored
9 years ago
by
Benjamin Koltes
Browse files
Options
Downloads
Patches
Plain Diff
ajout des shadows
parent
2ea10495
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
scenes/shadow.py
+24
-0
24 additions, 0 deletions
scenes/shadow.py
scenes/two_spheres.png
+0
-0
0 additions, 0 deletions
scenes/two_spheres.png
with
24 additions
and
0 deletions
scenes/shadow.py
0 → 100644
+
24
−
0
View file @
cc0404f8
# Show to python where to find the modules
import
sys
sys
.
path
.
append
(
'
..
'
)
from
scene
import
*
from
light
import
Spotlight
from
camera
import
Camera
from
raytracer
import
raytracer_render
from
matplotlib.image
import
imsave
import
sys
camera
=
Camera
(
200
,
200
,
1
)
materiau_sphere_bleue
=
Material
(
Vector
((
0
,
0
,
1
)),
.
5
,
.
4
,
.
6
,
50
,
1
)
materiau_sphere_rouge
=
Material
(
Vector
((
1
,
0
,
0
)),
.
4
,
.
3
,
.
2
,
20
,
1
)
sphere_bleue
=
Sphere
(
Vector
([
0
,
0
,
3
]),
.
8
,
materiau_sphere_bleue
)
sphere_rouge
=
Sphere
(
Vector
([
0.5
,
0.5
,
2
]),
.
5
,
materiau_sphere_rouge
)
lumiere
=
Spotlight
(
Vector
((
1
,
1
,
0
)),
Vector
((
1
,
1
,
1
)))
scene
=
Scene
()
scene
.
add_object
(
sphere_bleue
)
scene
.
add_object
(
sphere_rouge
)
scene
.
add_light
(
lumiere
)
affiche
=
raytracer_render
(
camera
,
scene
)
imsave
(
'
two_spheres.png
'
,
affiche
)
This diff is collapsed.
Click to expand it.
scenes/two_spheres.png
0 → 100644
+
0
−
0
View file @
cc0404f8
7.14 KiB
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