diff --git a/doc/ToDo.md b/doc/ToDo.md index d3d5f69..4109274 100644 --- a/doc/ToDo.md +++ b/doc/ToDo.md @@ -1,6 +1,5 @@ - - [ ] Fix some of the initial tests to use a real color value, rather - than the placeholder :red value I was using. Also, rename the test - appropriately. + - [ ] add a command-line interface for passing options (particularly + for passing resolution arguments) - [ ] I still find first-hit to be rather ugly. I'd like to abstract out bits of it, and make it easier to read. @@ -28,9 +27,6 @@ Again, this requires the scene description to be a hierarchical graph. - - [ ] add a command-line interface for passing options (particularly - for passing resolution arguments) - - [ ] add provisions for velocity coordinates, and relativistic effects (this would fall under the pie-in-the-sky category of feature additions, but it would be nice to finally do this) @@ -52,3 +48,7 @@ - [X] I currently mix floats and ints in my tests, rather arbitrarily. I need to normalize this. + + - [X] Fix some of the initial tests to use a real color value, rather + than the placeholder :red value I was using. Also, rename the test + appropriately. diff --git a/project.clj b/project.clj index f803285..6989495 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject toy-raytracer "2.0.0" +(defproject toy-raytracer "2.0.1" :license {:name "MIT License"} :dependencies [[org.clojure/clojure "1.5.1"]] :main toy-raytracer.core ) diff --git a/test/toy_raytracer/core_test.clj b/test/toy_raytracer/core_test.clj index ace63dd..1052c27 100644 --- a/test/toy_raytracer/core_test.clj +++ b/test/toy_raytracer/core_test.clj @@ -11,7 +11,7 @@ (def displacement-result (->Point -3.0 -3.0 -3.0)) -(def red-surface (->Surface :red)) +(def red-surface (->Surface (apply ->Color [1.0 0.0 0.0]))) (def red-sphere (->Sphere red-surface 5.0 dummy-point)) @@ -39,14 +39,14 @@ ;(deftest intersect-test ; (is (nil? (intersect red-sphere dummy-point dummy-ray))) ) -(def pixel (->Point 0 0 0)) +(def pixel (->Point 0.0 0.0 0.0)) -(def sphere-back (defsphere 1.0 200.0 [ 0.0 0.0 -1200.0])) -(def sphere-front (defsphere 1.0 200.0 [ 0.0 0.0 1200.0])) -(def sphere-bottom (defsphere 1.0 200.0 [ 0.0 -1200.0 0.0])) -(def sphere-top (defsphere 1.0 200.0 [ 0.0 1200.0 0.0])) -(def sphere-left (defsphere 1.0 200.0 [-1200.0 0.0 0.0])) -(def sphere-right (defsphere 1.0 200.0 [ 1200.0 0.0 0.0])) +(def sphere-back (defsphere 200.0 [ 0.0 0.0 -1200.0] [1.0 1.0 1.0])) +(def sphere-front (defsphere 200.0 [ 0.0 0.0 1200.0] [1.0 1.0 1.0])) +(def sphere-bottom (defsphere 200.0 [ 0.0 -1200.0 0.0] [1.0 1.0 1.0])) +(def sphere-top (defsphere 200.0 [ 0.0 1200.0 0.0] [1.0 1.0 1.0])) +(def sphere-left (defsphere 200.0 [-1200.0 0.0 0.0] [1.0 1.0 1.0])) +(def sphere-right (defsphere 200.0 [ 1200.0 0.0 0.0] [1.0 1.0 1.0])) (def dummy-world [ sphere-front