Skip to content
Snippets Groups Projects
Commit f4e41d9d authored by Benjamin Koltes's avatar Benjamin Koltes
Browse files

scenes

parent 4a920db8
No related branches found
No related tags found
No related merge requests found
scenes/one_sphere.png

2.75 KiB

# 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 = Material(Vector((0,0,1)), .5, .5, .5, 10, 1)
sphere = Sphere(Vector([0,0,3]), 1, materiau_sphere)
lumiere = Spotlight(Vector((1,1,0)), Vector((1,1,1)))
scene = Scene()
scene.add_object(sphere)
scene.add_light(lumiere)
affiche = raytracer_render(camera, scene)
imsave('one_sphere.png',affiche)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment