Parallel Computing
N-Body Problem
Explicit Multi-Threading
Spring 2013
-
Ray Tracing
-
bitmap PPM text P3 binary P6
-
-
Format
-
filetype (P3, P6)
-
numcols
-
numrows
-
maxval (usually 255)
-
pixel values... (in row major order)
-
-
Data is tokenized by whitespace, otherwise spacing is irrelevant.
-
Each pixel is three ints red-green-blue (text P3) or three bytes (binary P6).
-
-
Advice... avoid binary files (P6) even though total bytes are 2 or 3 or 4 to 1.
-
-
ray0 - random color data
-
ray1 - three circles determine which is seen by eye for each pixel
-
ray2 - light source plus ambient determine if in shadow otherwise dot product
-
ray3 - add a floor easy plane y=0.0 linear equation plus shadow or dot product
-
ray4 - checkerboard floor but be careful with MOD near zero
-
ray5 - reflection... recursion recursion (...refraction ...similar)
reflection_one_half.png
-
-
raytrace.txt
-
-
configuration file
-
spheres floor walls etc
-
handle many objects
-
need normals
-
pre-process (e.g., mesh of spheres)
-
-
OpenMP
-
pixels (may need super-sampling)
-
movie frames
-
-
Ideas
-
rolling ornaments
-
falling ornaments
-
rising setting sun
-
light bulb pendulum (interrogation?)
-
-
convert -loop 1 -delay 10 frame*.ppm movie.gif
-
-
"OR" if filesystem quota space is an issue perhaps...
-
-
convert frame000.ppm frame000.png
-
convert frame001.ppm frame001.png
-
...
-
convert frame999.ppm frame999.png
-
convert -loop 1 -delay 10 frame*.png movie.gif
-
-
movieinstructions.c.txt
-
-
rolling.gif (8.8 MB)
-
-
Surface Triangulation of a Sphere
-
-
elephant source
-
-
omp_demo.c.txt
Temporary Archive of Fall 2012
-
link
-
As of 28 January 2013.
Back to TJ CompSci
31 August 2012