]> Dogcows Code - chaz/rasterize/blobdiff - animate.lua
basic ray tracing with hard shadows
[chaz/rasterize] / animate.lua
index 0b7777699883128f7972581cf3204ba0c060a959..1e8daf7f5d0f34543cbda37adf40571420d0098a 100755 (executable)
@@ -17,8 +17,8 @@ local frames = 360
 -- Define the code to calculate where the camera is, in world coordinates.
 local eye = function(frame)
     -- just rotate around the center of the scene on the XZ plane
-    local center    = vec_new(0, 0.4, 0)
-    local distance  = 0.7
+    local center    = vec_new(0, -0.5, 0)
+    local distance  = 4
     local start     = math.pi
     local t = start + 2 * math.pi * frame / frames
     local v = vec_new(math.cos(t), 0, math.sin(t))
@@ -35,7 +35,12 @@ end
 -- extended urt format.
 local scene = [[
 l 0.0 10.0 1.0 0.8 0.7 0.8
-s 0.0 0.0 0.0 1.0 1.0 0.0 0.0
+p 0.0 -5.0 0.0 0.0 1.0 0.0 0.4 0.8 0.4
+s 0.0 0.0 0.0 1.25 1.0 0.0 0.0
+s -1.0 -1.0 0.0 1.0 0.0 1.0 0.0
+s 1.0 -1.0 0.0 1.0 0.0 0.0 1.0
+t -1.5 0.0 1.5 -1.0 1.0 0.0 -0.5 0.0 1.5 0.8 0.9 0.2
+t 1.5 0.0 1.5 1.0 1.0 0.0 0.5 0.0 1.5 0.2 0.9 0.8
 ]]
 
 -- Set the number of samples for supersampling.  If this is set to a value
@@ -92,7 +97,7 @@ U5
 %f %f %f
 0 1 0
 1.57 %f
-1.0 1.0 1.0
+0.4 0.4 0.4
 %s
 X
 ]], w, h, e.x, e.y, e.z, l.x, l.y, l.z, size.w/size.h, scene))
This page took 0.020817 seconds and 4 git commands to generate.