Skip to content

Commit

Permalink
Moving src/ to flatShading/
Browse files Browse the repository at this point in the history
  • Loading branch information
abuiles committed Oct 16, 2009
1 parent 3f9c029 commit 6db0a4a
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 30 deletions.
Binary file added flatShading/.swp
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/Parser.scala → flatShading/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ object SceneParser extends StandardTokenParsers {
def parse(s:String) = {
val tokens = new lexical.Scanner(s)
// Check there's only one camera and LightSource.
def checkTree (tree:List[SceneObject]) = (tree count (_.isInstanceOf[Camera])) >=0 &&
(tree count (_.isInstanceOf[LightSource])) >= 0
//def checkTree (tree:List[SceneObject]) = (tree count (_.isInstanceOf[Camera])) >=0 &&
// (tree count (_.isInstanceOf[LightSource])) >= 0
// lastFailure = None
phrase(sceneP)(tokens) match {
case Success(tree,_) =>
Expand Down
19 changes: 19 additions & 0 deletions flatShading/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- MIT LICENCE
-- Small raytracer in Scala. (Flat Shading)



- Requirements
*Scala 2.8.0

- Install :
"make" will do.

After compiled "scala Main" will write out a file called image.ppm in
the current directory with the scene declared in scene.pov


Authors:

Diego Echeverri.
Adolfo Leon Builes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions flatShading/scene.pov
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

sphere {
<0.5, 0.5, -0.5>,
0.3
pigment {
color Blue
}
}
sphere {
<0.0, 0.0, -0.8>,
0.1
pigment {
color Red
}
}
28 changes: 0 additions & 28 deletions src/scene.pov

This file was deleted.

0 comments on commit 6db0a4a

Please sign in to comment.