Created
July 29, 2013 07:49
-
-
Save snogglethorpe/6102723 to your computer and use it in GitHub Desktop.
eltex1.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local tex = require 'snogray.texture' | |
local mat = require 'snogray.material' | |
local surf = require 'snogray.surface' | |
local xform = require 'snogray.transform' | |
-- local earth_color = image_tex "../textures/oera/EarthMap_2500x1250.jpg" | |
local earth_color = 1 | |
local i = tex.image "../textures/pbrt/grid.exr" | |
local m = mat.lambert (i) | |
scene:add (surf.ellipse (m, pos (0,0,0), vec(0,0,20), vec(20,0,0))) | |
camera:move (pos (0, 20, 40)) | |
camera:point (pos (0, 0, 0), vec (0, 1, 0)) | |
--scene:add (surf.sphere (mat.glow(10 * earth_color), pos (0,5,0), 5)) | |
scene:add (surf.sphere2 (mat.glow(10 * earth_color), | |
xform.z_to_y (xform.translate (0,5,0) (xform.scale (5))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment