|
Post by baanish on Apr 24, 2023 0:16:13 GMT
Using the book values(with the camera moved back a little) I see this: Modifying the values to rotate by pi/2 rad in z seems to fix it //setup left wall
let mut left_wall = Sphere::new();
left_wall.transform = Matrix::translation(0.0, 0.0, 5.0)
* Matrix::rotation_z(-std::f64::consts::PI / 2.0)
* Matrix::rotation_x(std::f64::consts::PI / 2.0)
* Matrix::scale(10.0, 0.001, 10.0);
left_wall.material = floor.material;
//setup right wall
let mut right_wall = Sphere::new();
right_wall.transform = Matrix::translation(0.0, 1.0, 5.0)
* Matrix::rotation_z(std::f64::consts::PI / 2.0)
* Matrix::rotation_x(std::f64::consts::PI / 2.0)
* Matrix::scale(10.0, 0.001, 10.0);
right_wall.material = floor.material;
|
|