|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package eu.jonahbauer.raytracing;
|
|
|
|
|
|
|
|
|
|
import eu.jonahbauer.raytracing.math.AABB;
|
|
|
|
|
import eu.jonahbauer.raytracing.math.Vec3;
|
|
|
|
|
import eu.jonahbauer.raytracing.render.texture.CheckerTexture;
|
|
|
|
|
import eu.jonahbauer.raytracing.render.texture.Color;
|
|
|
|
@ -162,12 +163,11 @@ public class Examples {
|
|
|
|
|
|
|
|
|
|
return new Example(
|
|
|
|
|
new Scene(
|
|
|
|
|
new Parallelogram(new Vec3(555, 0, 0), new Vec3(0, 555, 0), new Vec3(0, 0, 555), green),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 0), new Vec3(0, 555, 0), new Vec3(0, 0, 555), red),
|
|
|
|
|
new Box(
|
|
|
|
|
new AABB(new Vec3(0, 0, 0), new Vec3(555, 555, 555)),
|
|
|
|
|
white, white, red, green, white, null
|
|
|
|
|
),
|
|
|
|
|
new Parallelogram(new Vec3(343, 554, 332), new Vec3(-130, 0, 0), new Vec3(0, 0, -105), light),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 0), new Vec3(555, 0, 0), new Vec3(0, 0, 555), white),
|
|
|
|
|
new Parallelogram(new Vec3(555, 555, 555), new Vec3(-555, 0, 0), new Vec3(0, 0, -555), white),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 555), new Vec3(555, 0, 0), new Vec3(0, 555, 0), white),
|
|
|
|
|
new Box(new Vec3(0, 0, 0), new Vec3(165, 330, 165), white).rotateY(Math.toRadians(15)).translate(new Vec3(265, 0, 295)),
|
|
|
|
|
new Box(new Vec3(0, 0, 0), new Vec3(165, 165, 165), white).rotateY(Math.toRadians(-18)).translate(new Vec3(130, 0, 65))
|
|
|
|
|
),
|
|
|
|
@ -189,12 +189,11 @@ public class Examples {
|
|
|
|
|
|
|
|
|
|
return new Example(
|
|
|
|
|
new Scene(
|
|
|
|
|
new Parallelogram(new Vec3(555, 0, 0), new Vec3(0, 555, 0), new Vec3(0, 0, 555), green),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 0), new Vec3(0, 555, 0), new Vec3(0, 0, 555), red),
|
|
|
|
|
new Box(
|
|
|
|
|
new AABB(new Vec3(0, 0, 0), new Vec3(555, 555, 555)),
|
|
|
|
|
white, white, red, green, white, null
|
|
|
|
|
),
|
|
|
|
|
new Parallelogram(new Vec3(113, 554, 127), new Vec3(330, 0, 0), new Vec3(0, 0, 305), light),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 0), new Vec3(555, 0, 0), new Vec3(0, 0, 555), white),
|
|
|
|
|
new Parallelogram(new Vec3(555, 555, 555), new Vec3(-555, 0, 0), new Vec3(0, 0, -555), white),
|
|
|
|
|
new Parallelogram(new Vec3(0, 0, 555), new Vec3(555, 0, 0), new Vec3(0, 555, 0), white),
|
|
|
|
|
new ConstantMedium(
|
|
|
|
|
new Box(new Vec3(0, 0, 0), new Vec3(165, 330, 165), white).rotateY(Math.toRadians(15)).translate(new Vec3(265, 0, 295)),
|
|
|
|
|
0.01, new IsotropicMaterial(Color.BLACK)
|
|
|
|
|