Skip to content

Instantly share code, notes, and snippets.

@snogglethorpe
Created July 29, 2013 07:49
Show Gist options
  • Save snogglethorpe/6102723 to your computer and use it in GitHub Desktop.
Save snogglethorpe/6102723 to your computer and use it in GitHub Desktop.
eltex1.lua
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