Set up intersection correctly

This commit is contained in:
STP
2023-11-27 16:51:53 -05:00
parent e48bc02daa
commit 5aa73bcc1a
13 changed files with 10723 additions and 280 deletions

22
rhai/test.rhai Normal file
View File

@@ -0,0 +1,22 @@
let scene = Scene();
let material = Material(V(0.2,0.2,0.2), V(0.2, 0.8, 0.8), 10.0);
//let ambient = Light(P(10.0,0.0,0.0), V(1.0,1.0,1.0), V(0.0, 0.0, 0.0));
//scene.addLight(ambient);
let light = Light(P(0.0,0.0,2.0), V(0.0,0.0,1.0), V(0.1, 0.01, 0.001));
scene.addLight("blue", light);
let light = Light(P(2.0,0.0,0.0), V(0.0,1.0,0.0), V(0.1, 0.01, 0.001));
scene.addLight("green", light);
let light = Light(P(-2.0,0.0,0.0), V(1.0,0.0,0.0), V(0.1, 0.01, 0.001));
scene.addLight("red", light);
let light = Ambient(V(0.1,0.1,0.1));
scene.addLight("ambient", light);
let stein = Steiner(material);
let stein_node = Node(stein);
scene.addNode("stein", stein_node);
scene