|
Computer Graphics |
Fall 2000
|
Computer Graphics
Homework 13
Copyright © 2000 David C. Banks
Each item below is worth 800 points. Pick one, subject to the consent of the instructor.
| Time | Student | Project |
| 09:35 | McDonald | Gravity |
| 09:40 | Giordano | Model of Seminar Room |
| 09:45 | Perry | Nuclear Scattering |
| 09:50 | Maynard | Model of Visualization Lab |
| 09:55 | Grant | Streamlines on the Earth |
| 10:00 | Fleming | BMRT Light Box |
| 10:05 | Reznik | Povray Light Box |
| 10:10 | Mowad | Radiance Light Box |
| 10:15 | Hood | Brain Visualization: Textures |
| Brain Visualization: Volumes | ||
| 10:20 | Wimmer | 3D Scanning |
| 10:25 | Denovo | Multithreaded animation |
| 10:30 | Sweeters | 3D Tracker |
| 10:35 | Cates | A Big Pixmap on the Sidewalk |
Create an image from software you have written. Get permission from the university to color on a piece of the sidewalk outside the Dirac Science Library. Lay out a grid on the sidewalk, maybe 100x100 pixels. Use colored chalk to color the pixels on the sidewalk based on your image. Write your initials near the image. You may recruit volunteers to assist you: there are lots of pixels to be filled.
Capture video or images of the process. Make a Web page that shows the process and explains how you converted your colors to the chalk colors. If the image is not rained on, show it to the class through one of the big windows on the 4th floor of Dirac.
Use a 3D tracker to create or navigate in a scene. Record the interactive session into a movie. Videotape someone using it, or take pictures with a digital camera. Make a Web page that describes the demo. Link to your code, Makefile, README, images, animations.
Modify your bouncing ball demo to illustrate scattering.
Put N little spheres (each with radius r1, mass m1, and velocity magnitude v1) into a spherical volume with radius rN. These are protons and neutrons in the nucleus. Let them collide elastically with each other.
Launch a sphere with radius r2, mass m2, and velocity magnitude v2 toward the middle of the nucleus. It will probably eject some spheres. When a sphere reaches the edge of the experimental "detector" with radius rD, make it stop there.
Make the scattering experiment repeat K times.
Run the experiment with different values for the nucleons and the test particle. Record animations. Put code, images, animations, and a description on your Web page.
Modify your solar system to include the effects of real gravity. Each object has a mass. Each mass is accelerated due to the gravitational force of the other objects.
Use exponents to modify the mass, distance, and initial velocity of the planets. For some values, the solar system will come apart. Record animations and make images. Put them on your Web page, with links to your code. Include a description of what you did.
Using the Open Inventor file format, model the Visualization Lab. Use textures created from images captured via a digital camera. Make the model accurate, based on actual measurements of the dimensions of the walls, tables, etc. Search the Web for 3D models of workstations, chairs, tables, mice, monitors, keyboards, mousepads, shelves, etc. to match the actual lab (convert them to Inventor where necessary). Include lighting to mimic the lighting in the lab.
Create versions of the model with low, medium, and high quality. Put images on the Web, and links to your models. Include a description of what you did and credit any sources of models you found or converted.
Same as above, but for the Seminar Room in Dirac.
Create images using BMRT (Blue Moon Rendering Toolkit www.bmrt.org) You will need to download and learn to use it. Make a model of your light box. Create images of it using BMRT. Convert them to an animation.
Put the images, animation, and data on your Web page. Include a description of what you did.
Create images using Povray (Persistance of Vision Raytracer www.povray.org). You will need to download and learn to use it. Make a model of your light box. Create images of it using Povray. Convert them to an animation. Ask Steve Mitchell (mitchell@dirac.csit.fsu.edu) for help.
Put the images, animation, and data on your Web page. Include a description of what you did.
Create images using Radiance (radsite.lbl.gov). You will need to download and learn to use it. Make a model of your light box. Create images of it using Radiance. Convert them to an animation.
Put the images, animation, and data on your Web page. Include a description of what you did.
Download the streamline package from Greg Turk's page. Try it out on the vector fields included in the package. Find some time-varying vector fields on the Web that give wind velocities over the Earth (or over a rectangular region). Create images using the streamline package. Create texture maps and put them over an image of the Earth. Use OpenInventor.
Get a demo from Dr. Bruno Jobard of his streamline animation software. Apply it to wind fields over the the Southeastern US.
Create a Web page with images and animations and a description of what you did.
Contact Dr. Monica Hurdal (mhurdal@math.fsu.edu) in our Math department. Have her show you the circle-packing program for her flat-map research (part of the NIH Human Brain Project).
Use or improve your circle-drawing code to make images of lots of circles. Read them from a file that contains the centers (x,y) and radii for the circles. Her file format might also contain colors for the circles as well. Generate very large images (maybe 2k*2k) and convert them to jpg and sgi:rgb formats.
Texture map these images onto a sphere using the Inventor file format. The sphere is a low-resolution approximation to the shape of a brain.
I wrote a shell script to convert Hurdal's triangle mesh into an Inventor file. Turn it into a Perl script. Read over the Inventor examples on indexedFaceSets, texture mapping, and the Inventor file format. Hurdal has an additional file that specifies the texture coordinates for each vertex. Read that file and use its texture coordinates.
Create an Inventor file with the brain as an indexedFaceSet whose polygons and texture coordinates are specified from Hurdal's data. Use the circle image you created and texture map it onto the brain.
Contact Dr. Monica Hurdal (mhurdal@math.fsu.edu) in our Math department. Have her show you the Amira visualization package on the SGI (note: load the data as bytes, not 2-byte shorts). She has 6 MRI datasets of a normal brain. They can be found in /rivera/e/mhurdal/mri6 . Each dataset is a volume of size xDim*yDim*zDim with a scalar value at each sample. The 512-byte ASCII header gives info on the dimensions and other stuff. Sort of like a 3D ppm file.
The purpose of this project is to write simple tools that can operate on these datasets, then to show the results with a 3D visualization package.
Write a simple program to add 2 of these datasets together and produce another dataset. It may involve 3 nested loops doing something like this.
mriData *dataSrc1 = new mriData(xDim, yDim, zDim);
mriData *dataSrc2 = new mriData(xDim, yDim, zDim);
mriData *dataDest = new mriData(xDim, yDim, zDim);
dataSrc1->read(filename1); // you implement the "read" method.
dataSrc2->read(filename2);
dataType source1, source2;
for (int xi = 0; xi < xDim; xi ++)
{
for (int yi = 0; yi < yDim; yi ++)
{
for (int zi = 0; zi < zDim; zi ++)
{
source1 = dataSrc1->getValue(xi, yi, zi);
source2 = dataSrc2->getValue(xi, yi, zi);
dataDest(xi, yi, zi).setValue(source1 + source2);
}
}
}
dataDest->write(filenameDest);
Alternatively, you could implement an overloaded addition operator that has the nested loops, then just write dataDest = dataSrc1 + dataSrc2. Use the code to add the datasets together.
add3d brainSum.mri brain1.mri brain2.mri add3d brainSum.mri brain3.mri brainSum.mri add3d brainSum.mri brain4.mri brainSum.mri add3d brainSum.mri brain5.mri brainSum.mri add3d brainSum.mri brain6.mri brainSum.mri
Write a program to multiply a dataset by a scalar value.
multiply3d brainAverage.mri 0.166666 brainSum.mri
Write a program to subtract one dataset from another.
subtract3d brainDiff1.mri brain1.mri brainAverage.mri subtract3d brainDiff2.mri brain2.mri brainAverage.mri subtract3d brainDiff3.mri brain3.mri brainAverage.mri subtract3d brainDiff4.mri brain4.mri brainAverage.mri subtract3d brainDiff5.mri brain5.mri brainAverage.mri subtract3d brainDiff6.mri brain6.mri brainAverage.mri
(Optional) Write a program to compute the gradient of a dataset.
v.x = (f(x + dx, y , z ) - f(x - dx, y , z ))/(2.0*dx); v.y = (f(x, y + dy, z ) - f(x, y - dy, z ))/(2.0*dy); v.z = (f(x, y, z + dz) - f(x, y, z - dz))/(2.0*dz);
In the code fragment above, v is the gradient of the function f(x,y,z). Note that you have to guard against crossing the boundaries of the array.
if ((x - dx) < xMin)
{
v.x = (f(x + dx, y , z ) - f(x , y , z ))/dx;
}
else if ((x + dx) > xMax)
{
v.x = (f(x , y , z ) - f(x - dx, y , z ))/dx;
}
else
{
v.x = (f(x + dx, y , z ) - f(x - dx, y , z ))/(2.0*dx);
}
Your program can be used as follows.
gradient3d brainGradient1.mri brainDiff1.mri gradient3d brainGradient2.mri brainDiff2.mri gradient3d brainGradient3.mri brainDiff3.mri gradient3d brainGradient4.mri brainDiff4.mri gradient3d brainGradient5.mri brainDiff5.mri gradient3d brainGradient6.mri brainDiff6.mri
Make images with Amira of the resulting datasets described above. Put code, images, animations on your Web page with a description of what you did.
The Statistics department has a new 3D scanner at their disposal. Contact Dr. Anuj Srivastava (anuj@stat.fsu.edu) to learn to use the scanner. Scan your face. Scan the plastic brain in the vis lab. Scan ordinary objects (soda can, mouse, light bulb, ping-pong ball, flashlight, etch-a-sketch). Scan some of the light boxes in the Vis Lab. Convert the resulting meshes to Inventor. Put images and meshes on the Web with a description of what you did.
Rivera has 4 processors which could be used to increase the speed at which animations are computed. Uses multiple threads to utilize the 4 processors and create an animation of your bouncing spheres.
Write a script to launch your program with T threads and S spheres. Warn users that the machine will be reserved for benchmarking at a certain time. Record the speed that your application gets (make sure no one else is using the machine -- get help from kurtz@cs.fsu.edu). Make a graph of the timing results.
Put code, images, animations, results on your Web page, together with a description of what you did.