From 230a28691cf5a907fb00f79240f78ea95466932c Mon Sep 17 00:00:00 2001 From: STP Date: Fri, 24 Nov 2023 22:33:33 -0500 Subject: [PATCH] Changed name for scene --- scene.rhai | 23 +++++++++++++++++++++++ test.rhai | 20 -------------------- 2 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 scene.rhai delete mode 100644 test.rhai diff --git a/scene.rhai b/scene.rhai new file mode 100644 index 0000000..9b955a9 --- /dev/null +++ b/scene.rhai @@ -0,0 +1,23 @@ +let scene = Scene(); + +let eye = P(0.0, 0.0, 3.0); +let target = P(0.0, 0.0, 0.0); +let up = V(0.0, 1.0, 3.0); +let cam = Camera(eye, target, up, 70.0, 1.0); + +let material = Material(V(0.5,0.5,0.5), V(0.8, 0.8, 0.8), 0.5); + +let light2 = Light(P(0.0,0.0,-10.0), V(0.8, 0.8, 0.8), V(0.2, 0.0, 0.0)); + +scene.addLight(light2); + + +// let sphere = Sphere(P(0.0,0.0,0.0), 4.0, material); +// let node = Node(sphere); +// scene.addNode(node); + +let stein = Torus(1.0,2.0, material); +let node = Node(stein); +scene.addNode(node); + +scene \ No newline at end of file diff --git a/test.rhai b/test.rhai deleted file mode 100644 index c255c6c..0000000 --- a/test.rhai +++ /dev/null @@ -1,20 +0,0 @@ -let scene = Scene(); - -let eye = P(0.0, 0.0, 3.0); -let target = P(0.0, 0.0, 0.0); -let up = V(0.0, 1.0, 3.0); -let cam = Camera(eye, target, up, 70.0, 1.0); - -let material = Material(V(0.5,0.5,0.5), V(0.8, 0.1, 0.2), 0.25); - -let light = Light(P(2.0, 2.0, 2.0), V(0.8, 0.7, 0.3), V(0.4, 0.008, 0.0)); -let light2 = Light(P(2.0, -2.0, 2.0), V(0.3, 0.4, 0.8), V(0.4, 0.007, 0.0)); -scene.addLight(light); -scene.addLight(light2); - -let sphere = Sphere(P(0.0,0.0,0.0), 1.0, material); -let node = Node(sphere); -scene.addNode(node); - - -scene