Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scene()
- s = Scene() { background_color = Color(.1, .1, .2),
- camera = Perspective(45) { transform = Translate(2*y) } }
- s:add_entities({
- Plane(),
- --Sphere() { transform = Translate(y + 5*z) }
- })
- s:add_lights({
- Light() { color = white,
- transform = Translate(6*y - 3*x) }
- })
- for i = 1,30 do
- local v = Vector(3*math.cos(i/30*2*math.pi), 5 + 3*math.sin(i/30*2*math.pi), 15)
- local tf = Translate(v) * Scale(.2, .2, .2)
- s:add_entity(Sphere() { transform = tf })
- end
- s:add_entity(Sphere() { transform = Translate(100*z) * Scale(20,20,20) })
- return s
- end
Add Comment
Please, Sign In to add comment