archive-edu.com » EDU » H » HWS.EDU

Total: 727

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • CPSC 324, Spring 2004, Lab 12
    few global variables to this program change the createWorld function that sets up the scene graph data structure and change the animation in the timer function You can follow the following steps to make your solar system Step 1 You will want to be able to animate the rotation of the moon around the earth and of the earth around the sun In order to do this you will need two variables of type Rotate Declare global variables of this type named moonRotate and sunRotate Step 2 In the createWorld method you can delete the two lines that add a teapot and a light to the world Also the size of the model that you will be building is different from the one in the sample program so delete the line worldView setViewEye 0 0 5 near the end of the function and change the line that sets the view volume to worldView setViewVolume 7 7 7 7 7 7 Note that in this program the parameters of setViewVolume are xmin xmax ymin ymax zmin and zmax These parameters determine a box around the view reference point This is different from and more convenient than OpenGL where you have to specify the near and far clipping planes with respect to the eye rather than with respect to the view reference point Step 3 There will be a sun at the center of the world You can represent the sun with a yellow sphere Since the sun emits light you will want to use some emissive color I also scaled up the sun by a factor of 1 5 You can add the sun to the world with one statement world addObject new BasicObject SPHERE addTransform new Scale 1 5 setColor 0 3 0 3 0 3 setEmissiveColor 0 8 0 8 0 6 If you want the sun to actually cast light you also need to put a Light at the same position as the sun This light can simply be added to the world with the statement world addObject new Light 0 0 0 1 setColor 8 8 5 Step 4 The earth will go around the sun and will carry the moon with it The earth moon system will be represented as a Model Declare a variable named earth of type Model and set earth new Model First we will add the earth to this model earth addObject new BasicObject SPHERE setColor 0 7 0 7 1 This puts the earth at the origin inside the sun We have to translate it away from the origin to the position of the earth s orbit This can be done by adding a Translate transformation to the earth earth addTransform new Translate 4 0 0 Furthermore we want to be able to rotate the earth in its orbit This can be done by adding a Rotate transformation to the earth after adding the translation Because we will want to change the amount of rotation during the animation use the global

    Original URL path: http://math.hws.edu/eck/cs324/s04/lab12/ (2016-02-07)
    Open archived version from archive


  • CPSC 324, Spring 2004, Lab 13, Option 1
    of course Link Objects creates a scene that shares all the objects with the currently selected scene The objects are not copied the new scene contains pointers to the same objects that are in the original scene If you change the object in one scene it also changes in the other Use this option if you want to make a different view of an existing scene It could also be used to make a shared unchanging background that you want to use for several scenes Link ObData creates a new scene that shares the object data of the objects in the current scene The object data is what you change in Edit mode You can transform animate the objects separately in the two scenes but if you edit the object in one scene the changes also apply to the other scene Full Copy as you might expect makes a complete copy of the current scene so that changes made in one scene have no effect on the other Step 1 Create a Full Copy of the scene named title Make sure that title is the currently selected scene Use the Add New command in the scene browsing menu and select Full Copy from the popup menu Edit the text in the new scene to say The End Since you made a full copy the text does not change in the original scene If you had selected Link Objects or Link ObData the text would also change in the title scene Your new scene will be named title 001 To change the name SHIFT click the title and type the new name Later you will put this scene at the end of the movie The Sequencer Step 2 Now create a new empty scene to use for the sequencer This scene will represent the entire movie and you will work in this scene for the rest of the lab You want to work with the sequencer screen so select sequencer from the SCR not SCE menu You will see a large work area in the center of your computer screen This is where you will build the movie The top right area is for previewing frames of the movie I don t actually know what the top left area is for The sequencer work area is a time line with time flowing from left to right The horizontal scale at the bottom is in seconds This scale is controlled by the Frs sec setting in the Display buttons You just have to add the elements of the movie to this work area Step 3 Add the scene named title to the movie as follows Make sure that the cursor is over the work area Hit SHIFT A This calls up a menu for adding items to the movie Select Scene from this menu This pops up a menu that allows you to select one of the scenes from your Blender project A little bar appears that represents the time extent of

    Original URL path: http://math.hws.edu/eck/cs324/s04/lab13_blender/ (2016-02-07)
    Open archived version from archive

  • CPSC 324, Spring 2004, Lab 13, Option 2
    to change the value of variable that already exists declare size size 1 Note that the semicolons at the ends of these statements are required and that POV Ray does not have a operator Once a variable exists and has a numeric value it can be used anywhere that a number could be used For example box 0 0 0 One corner of the box size size size The opposite corner texture Gold Metal The value of a variable doesn t have to be a number it can also be a vector or an object However I will not use that capability here POV Ray has control structures that start with while if and switch Note that the statements inside these control structures can include specifications of graphical objects An if statement for example could be used to decide between drawing a sphere and drawing a box We ll look at the POV Ray version of while loops here The while loop has the syntax while test statements end Step 1 Use a while loop to draw a semicircle of cylinders or of a different shape if you prefer A single cylinder can be drawn as follows where deg is a variable cylinder 0 5 8 Center of one end 0 5 8 Center of the other end 0 5 Radius texture Polished Chrome rotate 0 deg 0 Rotate deg degrees about the y axis You want to draw a cylinder for values of deg between 90 and 90 Use a while and some declares to do this Increment deg by 15 each time through the loop Constructive Solid Geometry Constructive Solid Geometry CSG refers to constructing solid objects by applying set operations such as union intersection and difference to several objects If you apply difference to objects X and Y the result consists of X with any parts that are common to X and Y removed That is you remove from X any regions where X intersects Y For example your could subtract one cylinder from another to make a hollow tube Here is how you would do something similar with boxes in POV Ray difference box A 6 by 6 by 6 cube 3 3 3 3 3 3 box 2 5 4 2 5 A smaller but longer 5 by 8 by 5 box 2 5 4 2 5 texture White Marble scale 2 You just list the objects to which you want to apply the difference operation Note that after the objects you can include things like textures and transformations that apply to the difference object You can also list more than two objects in the difference In that case objects number 2 3 etc are subtracted from object number 1 Step 2 Subtract three boxes from a cube leaving just the edges of the cube as shown in the cubical object in my image This is the same as the above code that subtracts one box from a cube you just have to subtract two

    Original URL path: http://math.hws.edu/eck/cs324/s04/lab13_pov/ (2016-02-07)
    Open archived version from archive

  • CPSC 324, Spring 2004, Lab 14
    blend You will see several views of a conference room Here is how to do the radiosity calculation for this room or for any other scene Point the mouse at one of the 3D windows and press the A key once or twice to select all the objects in the scene Only selected mesh objects will be part of the radiosity calculation Go to the radiosity buttons indicated in the Buttons Window Header by a little radiation symbol We will ignore most of these buttons and will use all the default settings Click the Collect Meshes button This collects the data needed for the radiosity calculation The 3D windows will change in appearance Most of the Blender interface shuts down until you finish the radiosity calculation by clicking the Free Radio Data button later after the calculation Click the Go button and watch the window in the upper right After a few seconds of preliminary calculation the whole scene will go dark except for the objects that emit light This is the initial setup for the radiosity calculation The computer will then start shooting energy from patches and you will see how the shot energy lights the scene The patches are outlined in green This starts off pretty quickly so watch carefully The cursor shows the number of patches that have shot The process will stop automatically or you can stop it whenever you want by hitting the ESC key To save the results of the calculation click the Replace Meshes button This replaces all your objects with one giant mesh that contains the radiosity information Then click Free Radio Data to return Blender to normal operation If you click Free Radio Data without clicking Replace Meshes the results of the calculation are discarded If you click Add New Meshes

    Original URL path: http://math.hws.edu/eck/cs324/s04/lab14/ (2016-02-07)
    Open archived version from archive

  • Using Linux
    This set is designed to use frames However you can also access all the pages through the main menu

    Original URL path: http://math.hws.edu/eck/about_linux/ (2016-02-07)
    Open archived version from archive

  • CPSC 324: Computer Graphics
    start talking about OpenGL programming You should read the first chapter of the OpenGL Programming Guide even though you will not be able to understand all of it at this time Second Week September 9 11 and 13 We will start off the week by continuing with basic 2D drawing in OpenGL You should read Chapter 2 pages 28 through 56 Note that the book is using the GLUT windowing system whereas we will use QT This doesn t change the OpenGL code but it does change the names of the functions that the code goes in This is how some of the functions in these two systems relate function in GLUT corresponding function in QT init GLCanvas initializeGL display GLCanvas resizeGL reshape GLCanvas paintGL On Friday we will start looking at 3D graphics using the 3D modeling program blender The goal is to learn some 3D concepts before we start trying to program with them Third Week September 16 18 and 20 We will take a first look at 3D graphics this week in the form of a lab on Blender a three dimensional modeling program The only reading for the week is the lab handout on Blender On Friday however we will move on to talking about color which is Chapter 4 of the OpenGL Programming Guide Fourth Week September 23 25 and 27 On Monday we will continue with our discussion of color You should read Chapter 4 but note that we will not used indexed color in OpenGL With a test coming up next Monday we will spend most of Friday reviewing and talking about the Gimp Your OpenGL paint program Lab 2 Exercise 2 is due in class on Wednesday Lab 3 should be posted on your Web site this week but I will not look at it until after Saturday noon Fifth Week September 30 October 2 and 4 There is a test on Monday September 30 A review sheet for the test is available On Wednesday we will have our third and final lab on the Gimp By Friday we should be ready to start in on 3D graphics programming in OpenGL The exercise for Lab 4 should be posted on your Web site by Thursday noon Sixth Week October 7 9 and 11 We will continue our study of three dimensional transformations this week The reading for the week is Chapter 2 pages 93 139 In lab we will be looking at a few of the more advanced modeling techniques in Blender Seventh Week October 16 and 18 There is no class on Monday because of Fall break We will have a lab on animation in Blender on Wednesday and on Friday we will continue with our discussion of transformation and 3D graphics in OpenGL There is no new reading for this week News Blender has been officially released under the GPL license which means that the source code is availablethat and that Blender is now permanently free A new website www

    Original URL path: http://math.hws.edu/eck/cs324/index_f02.html (2016-02-07)
    Open archived version from archive

  • CS324, Spring 2004, Information about Test 1
    display function 3D graphics 3D coordinates x y z The z axis Geometric modeling Transformations Moving Scaling Rotation Lighting in 3D Material properties Textures Camera viewpoint projection Rendering Blender Color models Direct color models RGB RGBA CMY HSV Color gamut Indexed color models Palette Graphics file formats GIF PNG JPG Lossless vs lossy compression The alpha channel Color channels as grayscale images Selections and Masks Alpha blending in OpenGL Anti

    Original URL path: http://math.hws.edu/eck/cs324/s04/test1_info.html (2016-02-07)
    Open archived version from archive

  • CPSC 324/327 Required meeting with job candidates
    candidate talks After each talk you will turn in a short evaluation of the candidate Your participation will be graded as a homework assignment for the course for a maximum of 20 homework points Grading will be as follows For attending one talk 10 points For attending two talks 17 points For attending three talks 20 points In addition to the talks there will be a time when each candidates

    Original URL path: http://math.hws.edu/eck/cs324/s04/candidate_assignment.html (2016-02-07)
    Open archived version from archive