When?
Tuesday, Dec 8th. 8 am - 10 am
Where?
Class will begin in Hydra Lab with OpenGL Shootem Demos. Subsequently we will move to classroom (C205) for written exam portion
What?
freeglut (./aaindex): ERROR: Internal errortry changing an option given to glutInitDisplayMode() in main. Instead of,in function fgOpenWindow X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 4 (X_DestroyWindow) Resource id in failed request: 0x0 Serial number of failed request: 21 Current serial number in output stream: 24
glutInitDisplayMode( GL_SINGLE | GL_INDEX );try this instead:
glutInitDisplayMode( GL_SINGLE | GL_RGBA );
For homework 8, your homework will be made up of three sub-programs, sphereTriangulate, sceneView3D, and shootem3D. Please follow the below command line formats so that my grading script can invoke your program without too much hassle. I have stolen the top half of Dr. Banks' octahedron file, so that you can easily concatenate your own geometry file to this header file, and then by adding this footer file, you will close the opening SCENE curly brace. An easy way to do this is by using "cat". So if you go this route, after you run your sphereTriangulate, feed your geometry file into cat like so:
cat footer.sc >> sphere.geom
cat sphere.geom >> header.scNote that I am still using the .sc file extension for SCENE files!
For Wednesday, November 4 (11:59 pm) you should have completed the first two program components sphereTriangulate and sceneView3D. As talked about in class on Tuesday, this includes the following milestones:
Command Line Format -------------------------------
./sphereTriangulate level <int> > sphere.geom where: level = refinement level (range: 0-4) sphere.geo = resultant output file (written to stdout) ./sceneView3D inFile <test.sc> xRes <width> yRes <height> > outScene where: inFile = scene input file xRes = image width (eventually inherited from shootem) yRes = image height (enventually inherited from shootem) outScene = scene image base filename (in PPM format) ./shootem3D inFile <test.sc> xRes <width> yRes <height> where: inFile = scene input file xRes = image width yRes = image height
For this homework we're going to try things differently. As I mentioned in class on October 13, command lines arguments are getting out of control. So for homework 07, lets do this: your program will only take three arguments to the program, the scene file, xRes and yRes. This way there won't be a ba-jillion command line arguments to this program. So to be explicit:
Homework 07 - sceneView2D
Please follow this format EXPLICITLY as I will not be lenient to this specification when grading this lab! --------------------------------
./sceneView2D inFile <test.sc> xRes <width> yRes <height> > out where inFile = scene input file xRes = image width yRes = image height
I will provide some input SCENE files that your program will work with. Please make sure your program works with these; it will help your grade overall. But also try to create some interesting scene files on your own!
Update: Here is a directory with some sample scene files for you to test your program with. More still to come....
Also the grading guide is HERE. (Just so you don't have to scroll all the way down. It's also at the bottom of my page though.)
Here is a PDF of the lecture I prepared on GPUs and programming languages.
Also here are some resources on the Interweb which were useful to me during my research for the lecture:
* OpenGL / GLSL
./scatterPath2D inFile test1.sc numBins [int] numBounces [int] cR [int] cG [float] outFiles outFile.in outFile.out where inFile = scene input file numBins = # of bins for your distributions numBounces = maximum # of scatter events (reflections) per photon cR = scales radii for starburst distribution circles cG = scales gray values for rendering starburst distribution circles outFiles = outFile.in shows the incident starbursts, outFile.out show exitant starbursts--------------------------------
test1.sc
SCENE version 2.0
dimension 2
simplex1 { simplex0 { 10.0 20.0 } simplex0 { 10.0 30.0 } emit 1500 absorb 1.0 }
sphere1 { center { 60.0 40.0 } radius 80.0 emit 0.0 absorb 0.2 }
Class,
I think I confused myself this morning, and I've told you incorrectly about homework 05. Here's why:
If every incident/exitant angle is rounded up to the nearest starburst line; then the rendered image is pointless (it would basically only be a picture of a cosine distribution starburst). Instead, you should use the cosine distribution to create your starburst "bins" and when choosing exitant angles, use the cosine distribution as well. I've attached a PDF with some pictures that will hopefully clarify things. PLEASE talk with me if you are still confused after this. The PDF will also be available for future viewing from my webpage.
Dr. Bank's has asked for each assignment, that I try to upload additional figures and notes to compliment his lecture slides. Sorry for not getting more uploaded before now, but I am new to using LaTex and Tikz, so it is a trial and error process. Nevertheless, I have compilied a PDF that has most of the pictures from the lecture on Thursday, the 24th. HW 5 Notes
For each homework, please follow a standard format when coding how arguments will be provided to your program. Each week, I will post a standard to follow.
--------------------------------
Homework 05 - photon2d:
./photon2d inFile test1.sc numBins [int] cR [int] cG [float] outFiles outFile.in outFile.out where inFile = scene input file numBins = # of bins for your distributions cR = scales radii for starburst distribution circles cG = scales gray values for rendering starburst distribution circles outFiles = outFile.in shows the incident starbursts, outFile.out show exitant starburstsPlease use the following syntax when creating your test input files:
test1.sc
SCENE version 1.0
dimension 2
simplex1 { simplex0 { 10.0 20.0 } simplex0 { 10.0 30.0 } emit 1500 absorb 1.0 }
simplex1 { simplex0 { 40.0 60.0 } simplex0 { 50.0 80.0 } emit 0 absorb 0.2 }
**** Please note the extension for scene files will be ".sc" ****
./scatter sensorDataIn [filename] numAngles [int] numSpeeds [int] speedMin [float] speedMax [float] where: sensorDataIn = shootem simulation output file numAngles = modifies histogram bins numSpeeds = modifies histogram bins speedMin = minimum speed from shootem speedMax = maximum speed from shootem, if too large, pick an arbitrary--------------------------------
./shootem inFile experiment1.prt frames 100 outFile out xRes 200 yRes 180 timeStep 0.1 massConst 0.1 where: inFile = particle data file frames = number of movie frames outFile = base filename (pFrame.0000.pgm .. pFrame.0099.pgm) xRes, yRes = size of image timeStep = dt to advance simulation in time massConst = coupling constant between masses--------------------------------
I have to adopt a late policy. Accepting late work is not fair to the students who complete their homeworks in a punctual fashion and receive full credit for their work. But I also know how sometimes these types of homework are dificult, and so my late penalty will not be harsh. It is as follows - 4 points will be deducted for every business day it is late.
So for every MTWRF, I will deduct points from your total score. Thus one week late = 20 points taken off. If you turn it into me on the weekend, you will receive only 2 days worth of reductions. Any questions, please feel free to ask me.
Update: Please send an email to notify me that your homework is ready to be collected and graded.
When tarring up each week's homework assignment for submission, please do not submit your program's output files! Starting homework 03, I will begin to deduct points if you submit output files.
Please only submit your source files, makefiles, and any generated example input files.
As per Dr. Banks' homework instructions, please make sure to create a webpage for each week's homework assignment. As a general rule, this page should include example results/outputs from the program generated by your work - as well as a link to the tarball which includes the source package. It is also a good idea to link each source file straight on the webpage so that it is available for immediate viewing. There will be no points deducted for simple webpages; the webpage needs to contain the information listed in the grading guide below, but as in previous homeworks, extra points may be awarded for a well designed website. Submission instructions have not changed; please be sure to continue to follow the directions outlined below.
** For Homework 03, there are a number of specific requirements for this assignment's homework webpage. Please view the Homework 03 Grading Guide below for full details on this week's requirements. **
In your web directory(webhome or www-home, depending on whether you are ECE or CS), create a "graphics" folder that will harbor a set of folders, one for each homework you complete in the class.
In each individual homework's folder, please place a gzipped tarball which includes the contents of your homework. Please also name the tarball "homework.##.tgz" (where ## is the number of the current homework).
Note that the tarball is compressed. Please tar using flags "-czf"
For example:
---------------------- askinne2@hires:~$ cd webhome askinne2@hires:~/webhome$ mkdir graphics askinne2@hires:~/webhome$ ls cs494 css graphics images index.html index.html~ askinne2@hires:~/webhome$ cd graphics/ askinne2@hires:~/webhome/graphics$ mkdir homework.01 askinne2@hires:~/webhome/graphics$ ls homework.01 askinne2@hires:~/webhome/graphics$ cd homework.01 askinne2@hires:~/webhome/graphics/homework.01$ ls homework.01.tgz ------------------------Please *strictly* follow these guidelines, as I will be running a script each Wednesday at midnight to wget each of your homework tarballs, and if the files are not exactly named right, I will not be able to retrieve your homework!
This seems pretty basic, but it needs to be said. Please insert usage menus into your program so that when a user attempts to execute your program without arguments, a menu will be printed out. For example:
askinne2@hydra4:~/graphics/homework.00$ ./raster Usage: ./raster keyword value ( examples below ) draw a pixel with color 151 at point 135 110 in image.pgm : ./raster style point gray 151 x 135 y 110 inFile image.pgm create a pgm image with color 223 of size 240 by 112 : ./raster style constant gray 223 xRes 240 yRes 112 draw a horizontal line with color ramp from 151 to 225 at row 110 in image.pgm : ./raster style lineH gLeft 151 gRight 225 y 110 inFile image.pgm