Playing around with funny()

This commit is contained in:
CJSatnarine
2024-07-11 22:55:17 -04:00
parent 2197114459
commit 73f9bf7be6
5 changed files with 640015 additions and 160011 deletions

View File

@@ -1,5 +0,0 @@
{
"files.associations": {
"random": "cpp"
}
}

Binary file not shown.

799992
image.ppm

File diff suppressed because it is too large Load Diff

View File

@@ -127,26 +127,35 @@ void earth(void) {
} }
void funny() { void funny() {
auto texture = make_shared<imageTexture>("face.png"); int sphereXPos = 400;
auto surface = make_shared<lambertian>(texture); int sphereYPos = 200;
auto object = make_shared<sphere>(point3(0, 0, 0), 2, surface); int sphereZPos = 400;
int cameraXPos = 3500;
int cameraYPos = sphereYPos;
int cameraZPos = 1200;
hittableList world;
auto material = make_shared<lambertian>(make_shared<imageTexture>("face.png"));
world.add(make_shared<sphere>(point3(sphereXPos, sphereYPos, sphereZPos), 100, material));
camera cam; camera cam;
cam.aspectRatio = 16.0 / 9.0; cam.aspectRatio = 1.0;
cam.imageWidth = 800; cam.imageWidth = 800;
cam.samplesPerPixel = 100; cam.samplesPerPixel = 100;
cam.maxDepth = 50; cam.maxDepth = 4;
cam.background = colour(0.70, 0.80, 1.00); cam.background = colour(0.70, 0.80, 1.00);
cam.vFieldOfView = 20; cam.vFieldOfView = 40;
cam.lookFrom = point3(0,0,12); cam.lookFrom = point3(cameraXPos, cameraYPos, cameraZPos);
cam.lookAt = point3(0,0,0); cam.lookAt = point3(sphereXPos, sphereYPos, sphereZPos);
cam.vUp = vec3(0,1,0); cam.vUp = vec3(0,1,0);
cam.defocusAngle = 0; cam.defocusAngle = 0;
cam.render(hittableList(object)); cam.render(world);
} }
void perlinSpheres() { void perlinSpheres() {
@@ -398,7 +407,7 @@ void finalScene(int imageWidth, int samplesPerPixel, int maxDepth) {
} }
int main(void) { int main(void) {
int sceneToShow = 11; int sceneToShow = 4;
switch (sceneToShow) { switch (sceneToShow) {
case 1: case 1: