Created
February 10, 2022 00:36
-
-
Save Costava/5392491520fa3ad9b845da349979023a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Output to stdout a solid red P3 .ppm image. | |
public class SolidRed { | |
public static void main(String args[]) { | |
int width = 100; | |
int height = 100; | |
int numPixels = width * height; | |
System.out.println("P3"); | |
System.out.println(width + " " + height); | |
System.out.println("255"); | |
for (int i = 0; i < numPixels; i += 1) { | |
System.out.println("255 0 0"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment