Just playing around

This commit is contained in:
CJSatnarine
2024-07-09 14:52:10 -04:00
parent bef20a9b1f
commit 4c58e4a084
5 changed files with 283020 additions and 282995 deletions

Binary file not shown.

BIN
face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 KiB

565988
image.ppm

File diff suppressed because it is too large Load Diff

View File

@@ -121,8 +121,30 @@ void earth(void) {
cam.render(hittableList(globe)); cam.render(hittableList(globe));
} }
void funny() {
auto texture = make_shared<imageTexture>("face.png");
auto surface = make_shared<lambertian>(texture);
auto object = make_shared<sphere>(point3(0, 0, 0), 2, surface);
camera cam;
cam.aspectRatio = 16.0 / 9.0;
cam.imageWidth = 800;
cam.samplesPerPixel = 100;
cam.maxDepth = 50;
cam.vFieldOfView = 20;
cam.lookFrom = point3(0,0,12);
cam.lookAt = point3(0,0,0);
cam.vUp = vec3(0,1,0);
cam.defocusAngle = 0;
cam.render(hittableList(object));
}
int main(void) { int main(void) {
int sceneToShow = 3; int sceneToShow = 4;
switch (sceneToShow) { switch (sceneToShow) {
case 1: case 1:
@@ -134,5 +156,8 @@ int main(void) {
case 3: case 3:
earth(); earth();
break; break;
case 4:
funny();
break;
} }
} }