DOC PREVIEW
CORNELL CS 404 - Problem Set #3

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 404: Problem Set 3Directions for SubmissionE-mail your answers to me at [email protected]. The subject of your mes-sage should be “CS404 PS3,” and the body of the message should containyour answers. Some mailers can format messages using HTML or RTF.Please turn this feature off and send your message using plain text. If forsome reason you cannot send your message as text, you may attach youranswers as a text file.Essential Knowledge–Please give a brief answer (1-2sentences) for each1. True or False. If you don’t register you code with the Library ofCongress (and pay the $35 fee), someone may legally copy your codewithout your p ermiss ion. Answer “true” or “false” and give a shortexplanation.2. You just invented a revolutionary algorithm to compute the optimalroute a traveling salesman (or political candidate) should take betweencities, allowing him/her to visit all n cities using the least amount ofgasoline1. To keep Microsoft from stealing your idea, what should youdo?3. You’re given a version of LAPACK that has b e en compiled and storedin a Windows dynamically-linked library (DLL). What two things mustyou do to call routines in this library?More OpenGL4. Download RAD1Dgl2.tar from the course website (near the problemsets). This is an extension of the RAD1D version with OpenGL calls1Don’t laugh. This is a real problem known as the traveling salesman problem (for obvi-ous reasons). Presently, no one has developed a polynomial time algorithm (an algorithmthat takes npsteps, where p doesn’t depend on n) to solve this problem. The interest-ing aspect of the traveling salesman problem is that if you could solve it in polynomialtime, you could solve a whole class of important problems without known polynomial-timesolutions.1used on Friday. I have added the routine EmphasizeTime to GLout.c.In the main subroutine, I register this with GLUT as the “glutSpecialFunc”–the function that is called when the user presses “special” keys on thekeyboard. Look at the code for EmphasizeTime. What keys does itrespond to? What variables does it modify? I’ve placed a link to theGLUT manual on the course website, although you should be able tofigure out this question without it.5. The variable modified in EmphasizeTime allows the user to pick a par-ticular time from the samples of C stored in GLC. Your job is to addOpenGL calls to DrawC so that time-slice selected by the user is plot-ted as a green line. Remember, to create a colored line in OpenGL,you first pick a color, then call glBegin(GL LINE STRIP). You thenspecify a series of line segments by calling glVertex2d. Finally, the lineis ended by calling glEnd(). When you get your green lines to work,copy your DrawC routine into an e-mail and send it to


View Full Document

CORNELL CS 404 - Problem Set #3

Download Problem Set #3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Problem Set #3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Problem Set #3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?