7 Pages

doc.txt

Course: COP 6557, Spring 2008
School: UNF
Rating:
 
 
 
 
 

Word Count: 1511

Document Preview

Gewiz The Language by Kyle Hegeman Chris Beckenbach Laura Grier Programming Language Paradigms CIS6930CT Dr. Eggen April 25, 2002 The Gewiz Language Introduction The latest generation of video cards contain a programmable processor. Two of these are the Nvidia Gforce3 and the ATI Radeon 7500+ cards. The programming features are used to customize the graphics processing being performed by the card. Vertex...

Register Now

Unformatted Document Excerpt

Coursehero >> Florida >> UNF >> COP 6557

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Gewiz The Language by Kyle Hegeman Chris Beckenbach Laura Grier Programming Language Paradigms CIS6930CT Dr. Eggen April 25, 2002 The Gewiz Language Introduction The latest generation of video cards contain a programmable processor. Two of these are the Nvidia Gforce3 and the ATI Radeon 7500+ cards. The programming features are used to customize the graphics processing being performed by the card. Vertex Program A vertex program is an assembly language program that is executed on the Graphics Processing Unit of a video card with the purpose of customizing the display of the vertex. Assembly language interface to T&L unit GPU instruction set to perform all vertex math Reads an untransformed, unlit vertex Creates a transformed vertex Optionally creates Lights a vertex Creates texture coordinates Creates fog coordinates Creates point sizes More information can be found about vertex programs at: http://developer.nvidia.com/view.asp?IO=vertex_programs Proposal This is a high level language that abstracts the programmer from the low level details of programming for a particular card. When the program is compiled, the compiler will generate a series of assembly language instructions. These instructions can then be downloaded to the video card using the OpenGL graphics API. The assembly instructions generated change the lighting of the graphics predefined (in the input parameters) by the graphics designer. They do not create the actual graphics. The following assembly language instructions are supported: MOV MAD (in limited form) MUL ADD RCP RSQ (in limited form) DP3 DP4 move (assignment) multiply and add multiply add reciprocal (inverse) reciprocal square root dot product of 3 floats dot product of 4 floats A full explanation of these assembly language instructions can be found in the VertexPrograms.pdf found at: http://developer.nvidia.com/view.asp?IO=vertex_programs Extensions beyond the scope of this project could be made to target the DirectX API. Hardware Documentation Nvidia documentation for vertex programming http://oss.sgi.com/projects/ogl-sample/registry/NV/vertex_program.txt Language Design Data Types There are 3 data types supported by the language. float vertex contains 4 floats matrix contains 3 or 4 vectors Data Type Prefixes These are used instead of keywords to specify the data type. Prefix % ` " Data Type float vertex matrix Example %Normalized `Position "Perspective Data Access The data types names must begin with the prefix, followed by a letter, then any number of letters, underscores, or digits following that. A user can access any of the types that make up that particular data type: "matrixname[0] // access first vector of matrix "matrixname[1].xy // access first and second floats of second vector of matrix `vectorname.y // access second float of vector These same access rules apply to the functions, so if the function normalize returns a vector, a float can be accessed in the following manner: normalize(`vectorname).z // access the third float of the vector normalize has returned Input Parameters This list is a set of vertex types that maps to the v[] vertex attribute registers. These are used to pass the vertex program information about the vertex from the OpenGL API. A vertex can have up to 8 textures when multi-texturing is enabled, thus the long list of texture coordinates. Name input_position input_weight input_normal input_color0 input_color1 input_fog input_texture0 input_texture1 input_texture2 input_texture3 input_texture4 input_texture5 input_texture6 input_texture7 Description Position of the vertex Weight of the vertex Surface normal at the vertex Primary vertex color Secondary vertex color Fog coordinate Texture coordinate Texture coordinate Texture coordinate Texture coordinate Texture coordinate Texture coordinate Texture coordinate Texture coordinate Output Parameters This list is a vertex types that maps to the o[] vertex output registers. These hardware registers are used to pass the results of the vertex program back to the hardware for display purposes. A vertex program must assign a value to the output_position parameter to be valid. This is a requirement of the underlying hardware. Name output_ position output_color0 output_color1 output_back_color0 output_back_color1 output_fog output_point_size output_texture0 output_texture1 output_texture2 output_texture3 output_texture4 output_texture5 output_texture6 output_texture7 Description Homogenous Position of the vertex Primary Color Secondary Color Primary Color for Back Face Secondary Color for Back Face Fog Coordinate Point Size Texture Coordinate Texture Coordinate Texture Coordinate Texture Coordinate Texture Texture Coordinate Coordinate Texture Coordinate Texture Coordinate Operators This is a list of operators implemented by GeWiz. Other operators are mathematically viable, however they were not because they are not practical on the current hardware. For example any operation that would require the creation of a temporary matrix is not supported because that would require 4 temporary registers and the hardware only has 12. To support this feature would require making the user aware of how certain operations are implemented on the hardware. Instead matrices treated as read-only aliases to the c[] registers. Operator overloading has been implemented. + / * cross dot .xyzw // Add Subtract Divide Multiply Cross Product Dot Product Order Comment Add a vector to a vector or a float to a float Subtract a vector from a vector or a float from a float Divide a vertex by a float or a float by a float Multiply a vertex and a matrix, two vertices, two floats and a float by a vertex. Perform a cross product on two vectors Performs a dot product on two vectors This operator allows the user to specify the order of components of a vector. It also allows for a 3 component vector The rest of the line is ignored by the compiler Functions This is a list of the current functions. Due to time constraints only two predefined math functions exist, and function overloading was not implemented, as was suggested by the powerpoint slides. Function Matrix Vertex Normalize Inverse Return matrix vertex vertex float Parameters Indices to input parameters Indices to input parameters vertex float Description Creates a matrix with data from the input program registers (c[]) Creates a vertex with data from the input program registers (c[]) Takes a vector and returns a normalized version Takes a float and returns its inverse Known Bugs Some floats may not get assigned in these scenarios (the number of floats on both sides don't have to match currently). `vect.xy = vector(1).wzy; vect.wzy = vector(1).x; Making sure unassigned variables were not used on the right hand side of assignment statements at compile time became too complex to implement (the powerpoint slides indicated that we had done that). The static semantics check for beginning and ending program name is broken. Program 1 Original program from nutty.org DP4 R0.x,v[OPOS],c[0]; DP4 R0.y,v[OPOS],c[1]; DP4 R0.z,v[OPOS],c[2]; DP4 R0.w,v[OPOS],c[3]; DP4 R1.x,R0,c[4]; DP4 R1.y,R0,c[5]; DP4 R1.z,R0,c[6]; DP4 R1.w,R0,c[7]; DP3 R2.x, c[0], v[NRML]; DP3 R2.y, c[1], v[NRML]; DP3 R2.z, c[2], v[NRML]; - ModelView transformation - ModelView transformation - ModelView transformation - ModelView transformation - Projection transformation - Projection transformation - Projection transformation - Projection transformation - Normal transformation - Normal transformation - Normal transformation DP3 R2.w, c[8], R2; - Lighting calculation MUL R3.xyzw,v[COL0].xyzw,R2.wwww; -Lighting calculation MOV o[COL0],R3; MOV o[HPOS],R1; - Output - Output Program 1 GeWiz version vertex_program main(): //Calculate the vertex color based on the direction to the light in world coordinates output_color0 = input_color0 * (Vector(8) dot (input_normal * Matrix(0 TO 2))); //Project the input vertex into homogenous screen coordinates output_position = input_position * Matrix(0 TO 3) * Matrix(4 TO 7); end main; Program 2 - Toon Shading from www.nutty.org DP4 R0.x,v[OPOS],c[0]; DP4 R0.y,v[OPOS],c[1]; DP4 R0.z,v[OPOS],c[2]; DP4 R0.w,v[OPOS],c[3]; DP4 o[HPOS].x,R0,c[4]; DP4 o[HPOS].y,R0,c[5]; DP4 o[HPOS].z,R0,c[6]; DP4 o[HPOS].w,R0,c[7]; DP3 R2.x, c[0], v[NRML]; DP3 R2.y, c[1], v[NRML]; DP3 R2.z, c[2], v[NRML]; ADD R3,c[9],-R0; DP3 R3.w,R3,R3; RSQ R3.w,R3.w; MUL R3,R3,R3.w; DP3 o[TEX0].x,R2,c[8]; DP3 o[TEX1].x,R2,R3; MOV o[COL0],v[COL0]; - ModelView transformation - ModelView transformation - ModelView transformation - ModelView transformation - Projection transformation. Store immediatly in output. - Projection transformation - Projection transformation - Projection transformation - Normal transformation - Normal transformation - Normal transformation - Get Vector from eye to vertex. - Get magnitude of vector. - Calculate reciprocal square root. - Multiply by recip square root. To make it normalized. - Dot product of normal, light vector, tone lookup. - Dot product of normal, eye vector, outline lookup. - Mov input color straight into output color. Toon Shading GeWiz version vertex_program main(): 'pos = input_position * Matrix(0 TO 3); output_position = 'pos * Matrix(4 to 7); 'norm = input_normal * Matrix(0 TO 2); output_texture0.x = 'norm dot Vector(8); output_texture1.x = 'norm dot normalize(Vector(9) - 'pos); output_color0 = input_color0; end main;
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

UNF - COP - 6557
vertex_program main():'pos = input_position * Matrix(0 TO 3);output_position = 'pos * Matrix(4 to 7);'norm = input_normal dot Matrix(0 TO 2);output_texture0 = 'norm dot Vector(8);output_texture1 = 'norm dot normalize(Vector(9) - 'pos);out
UNF - COP - 4610
HyperThreadingImproves processor performance under certain workloads by providing useful work for execution units that would otherwise be idle Duplicates sections of the processor those that store the architectural state does not duplicate ma
UNF - COP - 2220
C ProgrammingLecture 16 PointersPointersA pointer is simply a variable that, like other variables, provides a name for a location (address) in memory. a But the value that is stored in a pointer is always the address of another memory location.a
UNF - COP - 2220
C ProgrammingClass 10 Selection Making DecisionsRelational, Equality, and Logical OperatorsRelational Operators less than greater than less than or equal to greater than or equal to equal to not equal to (unary) negation logical and logical or <
UNF - COP - 2220
C ProgrammingLecture 4Tokens & SyntaxaThe compiler collects the characters of a program into tokens. Tokens make up the basic vocabulary of a computer language.aThe compiler then checks the tokens to see if they can be formed into legal st
UNF - COP - 2220
C ProgrammingLecture 3The Three Stages of Compiling a Programa aThe preprocessor is invoked The source code is modifiedThe compiler itself is invoked The modified source code is translated into object code (an object file) The loader uses
UNF - COP - 4620
Compiler Code Optimizations Compiler Code OptimizationsIntroduction Optimized code Executes faster efficient memory usage yielding better performance. Compilers can be designed to provide code optimization. Users should only fo
UNF - COP - 4620
Garbage Collection records not reachable reclaim to allow reuse performed by runtime system (support programs linked with the compiled code)Record Types live will be used in the future not live will not be used in the future reachable
UNF - COP - 2551
Chapter 7: InheritancePresentation slides forJava Software SolutionsFoundations of Program DesignSecond Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2000 by Jo
UNF - COP - 2551
Chapter 5: Enhancing ClassesPresentation slides forJava Software SolutionsFoundations of Program DesignSecond Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2000
UNF - COP - 2551
Writing Classesa aSee BankAccounts.java (page 188) See Account.java (page 189) An aggregate object is an object that contains references to other objects An Account object is an aggregate object because it contains a reference to a String object (
UNF - COP - 2551
Introduction to GraphicsaThe last one or two sections of each chapter of the textbook focus on graphical issues Most computer programs have graphical components A picture or drawing must be digitized for storage on a computer A picture is broken d
UNF - COP - 2551
Pr ogr am D evelopmentaThe creation of software involves four basic activities: establishing the requirements creating a design implementing the code testing the implementationaThe development process is much more involved than this, but t
UNF - COP - 2551
Chapter 1: Computer SystemsPresentation slides forJava Software SolutionsFoundations of Program DesignSecond Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2000
UNF - COP - 2551
Chapter 4: Writing ClassesPresentation slides forJava Software SolutionsFoundations of Program DesignSecond Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2000 b
UNF - COP - 2551
Repetition StatementsaRepetition statements allow us to execute a statement multiple times repetitively They are often simply referred to as loops Like conditional statements, they are controlled by boolean expressions Java has three kinds of repe
UNF - COP - 2551
Java Software SolutionsChapter 1 Computer Systems1Basic Computer Processing A computer system is made up of hardwareand software.Hardware: Chips, keyboards, disks, etc. Software: Programs and the data those programs use. Key Components
UNF - CHAPTER - 2551
Java Software SolutionsChapter 1 Computer Systems1Basic Computer Processing A computer system is made up of hardwareand software.Hardware: Chips, keyboards, disks, etc. Software: Programs and the data those programs use. Key Components
UNF - COP - 2551
Java Software SolutionsChapter 5 Enhancing Classes1References Revisited Object reference variablesAn object reference variable stores the address of an object. We use the dot operator to invoke an object'smethod.The address in the re
UNF - COP - 5
Java Software SolutionsChapter 5 Enhancing Classes1References Revisited Object reference variablesAn object reference variable stores the address of an object. We use the dot operator to invoke an object'smethod.The address in the re
UNF - CHAPTER - 2551
Java Software SolutionsChapter 5 Enhancing Classes1References Revisited Object reference variablesAn object reference variable stores the address of an object. We use the dot operator to invoke an object'smethod.The address in the re
UNF - COP - 2551
Chapter 2: Objects and Primitive DataPresentation slides forJava Software SolutionsFoundations of Program DesignThird Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyri
UNF - CHAP - 2551
Chapter 2: Objects and Primitive DataPresentation slides forJava Software SolutionsFoundations of Program DesignThird Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyri
UNF - COP - 2
Java Software SolutionsChapter 2 Objects and Primitive Data1Object-Oriented Programming This course introduces the idea of developingsoftware by defining objects: Objects with which we can interact via our programs. Objects which can inte
UNF - COP - 2551
Java Software SolutionsChapter 2 Objects and Primitive Data1Object-Oriented Programming This course introduces the idea of developingsoftware by defining objects: Objects with which we can interact via our programs. Objects which can inte
UNF - CHAPTER - 2551
Java Software SolutionsChapter 2 Objects and Primitive Data1Object-Oriented Programming This course introduces the idea of developingsoftware by defining objects: Objects with which we can interact via our programs. Objects which can inte
UNF - COP - 11
Chapter 11: RecursionPresentation slides forJava Software SolutionsFoundations of Program DesignThird Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2002 by John
UNF - COP - 2551
Chapter 11: RecursionPresentation slides forJava Software SolutionsFoundations of Program DesignThird Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2002 by John
UNF - CHAP - 2551
Chapter 11: RecursionPresentation slides forJava Software SolutionsFoundations of Program DesignThird Edition by John Lewis and William LoftusJava Software Solutions is published by Addison-WesleyPresentation slides are copyright 2002 by John
UNF - COP - 2551
COP 2551_43 Chapter 5 QuizName _ 6/24/2004For multiple choice questions, circle the letter beside the best answer. 1. Given the following instantiations and assignment statement: ChessPiece bishop1 = new ChessPiece(); ChessPiece bishop2 = new Che
UNF - COP - 2551
COP 2551 Summer 2004 Programming Assignment 4 = You are to write a java program that will perform the tasks described below and demonstrated in class. Be aware that there is a Cls.java class in the Program4 public subdirectory. You should begin using
UNF - COP - 4
COP 2551 Summer 2004 Programming Assignment 4 = You are to write a java program that will perform the tasks described below and demonstrated in class. Be aware that there is a Cls.java class in the Program4 public subdirectory. You should begin using
UNF - COP - 2551
COP2551Program 6Your sixth programming assignment is to create a scene with either a boat or a house and at least one person in the scene. You are to use the MED-Editor which you can copy in the 3rd floor lab or download from http:/www.med-editor
UNF - COP - 6
COP2551Program 6Your sixth programming assignment is to create a scene with either a boat or a house and at least one person in the scene. You are to use the MED-Editor which you can copy in the 3rd floor lab or download from http:/www.med-editor
UNF - COP - 2551
COP 2551 Summer 2004 Programming Assignment #3 Objectives: To obtain input from the keyboard using the InputStreamReader and BufferedReader classes .To create a separate class in addition to the driver class that contains the main() method. To insta
UNF - COP - 3
COP 2551 Summer 2004 Programming Assignment #3 Objectives: To obtain input from the keyboard using the InputStreamReader and BufferedReader classes .To create a separate class in addition to the driver class that contains the main() method. To insta
UNF - COP - 2551
Programming Assignment #1, Due Thursday May 20th by Start of Class Log into your Osprey account and use either vi or Pico (the text editors for this course) to enter and save the java program at the bottom of these instructions. Format the text as I
UNF - COP - 2551
UML Class Diagrams for Program 4ClassAveragesStudent1 *- name : Name - grades : Grades main(args : String[]) : void compareTo ( ) : int toString ( ) : String InsertionSort Name - fName : String - mInitial : String - lName : String getName( ) :
UNF - COP - 4
UML Class Diagrams for Program 4ClassAveragesStudent1 *- name : Name - grades : Grades main(args : String[]) : void compareTo ( ) : int toString ( ) : String InsertionSort Name - fName : String - mInitial : String - lName : String getName( ) :
UNF - COP - 2551
UNIX/LINUX TUTORIALHere is a minimal set of commands for the UNIX/LINUX systems: cat cd chmodDisplay or join files Change to another working directory Set access mode for a file or directory, for example $ chmod 700 phigbee The above command will a
UNF - COP - 2551
COP2551 INTRODUCTION TO viPaul HigbeeThe text editor named vi is a much more powerful editor than pico. It also takes more practice to learn to use vi. However, the time it takes to learn vi should be paid back within about two programming assign
UNF - COP - 2551
class Card implements Comparable{ . / construct with suit and face public Card(char currSuit, String currFace) / card describes itself (its suit and face) as a String public String toString() / interface method: compare this obje
UNF - COP - 3
class Card implements Comparable{ . / construct with suit and face public Card(char currSuit, String currFace) / card describes itself (its suit and face) as a String public String toString() / interface method: compare this obje
UNF - COP - 2220
C ProgrammingLecture 15Two Dimensional ArraysTwo-Dimensional ArraysaThe C language allows arrays of any type, including arrays of arrays.int a[100]; A 1-dimensional array capable of storing 100 integers. A 2-dimensional array capable of stori
UNF - COP - 3601
INSTALLING THE SIC SIMULATOR The SIC simulator is written in standard Pascal. It should be possible to install this simulator on almost any computer with a Pascal compiler, by making the minor changes described below. MAIN MEMORY SIZE The largest add
UNF - COP - 3601
Chapter 3 Loaders and LinkersPurpose and Function Places Linkingobject program in memoryCombines 2 or more obj programs Allows loading at different locations Relocation LinkageEditorProvides linking without loadingKinds of Loader
UNF - COP - 3601
Chapter 3 Loaders and LinkersPurpose and Function Places Linkingobject program in memoryCombines 2 or more obj programs Allows loading at different locations Relocation LinkageEditorProvides linking without loadingKinds of Loader
UNF - COP - 3601
HOW TO USE THE SIC LOADER This is an absolute loader that loads object programs in the format that is described in Section 2.1 of "System Software." The object program is read from file OBJFILE. After the program is loaded, the loader jumps to the in
UNF - COP - 3601
THE SIC SIMULATOR MAIN MEMORY SIZE The largest address in the simulated memory is hexadecimal 2FFF (decimal 12287). SIC FEATURES This version of the simulator supports most SIC/XE instructions and features (see the user documentation for details).H
UNF - COP - 3601
HOW TO USE THE SIC ASSEMBLER This is a simple assembler for SIC (standard version). It uses the following external files: SRCFILE OBJFILE LISFILE INTFILE -the source program to be assembled the object program generated by the assembly the assembly li
UNF - COP - 3601
Write 5 SIC/XE pgms that will run using the "six" interpreter.(1) Given a number of integers in SIZE, compute their average. Use PC-relative addressing (the default); do not use extended, immediate, or BASE-relative. Place the resul
UNF - COP - 3601
System Software Summer 2000 Semester ProjectsCodes for turnin: rbutler.cop3601.proj1 rbutler.cop3601.proj2The two projects for this semester are to implement passes 1 and 2 ofan assembler for a subset of the SIC/XE asse
UNF - COP - 3601
SIC Assembly Macro ProcessorVersion 1.1Dirk FrullaJanuary, 2002The purpose of this document is to explain the SIC assembly macro processor, its abilities, and how to use it. I. Compiling the SIC macro processorThe macro processor comes as a
UNF - COP - 3601
Line Source statement5 COPY START 0 180 FIRST STL RETADR 190 .CLOOP RDBUFF F1,BUFFER,LENGTH190a CLOOP CLEAR X 190b CLEAR A190c CLEAR S 190d +LDT #4096 190e TD =X'F1'190f JEQ
UNF - COP - 3601
Line Source statement5 COPY START 0 10 RDBUFF MACRO &INDEV, &BUFADR, &RECLTH15 .20 .MACRO TO READ RECORD INTO BUFFER25 .30 CLEAR X 35 CLEAR A40 CLEAR S45 +LDT #4096 50
UNF - COP - 3601
. Definition25 RDBUFF MACRO &INDEV=F1,&BUFADR=,&RECLTH=,&EOR=04,&MAXLTH=409626 IF (&EOR NE ')27 &EORCK SET 1 . BY DEFAULT 028 ENDIF30 CLEAR X 35 CL
UNF - COP - 3601
(a)NAMTAB . . . RDBUFF ptr_to_start ptr_to_finish . . .DEFTAB RDBUFF &INDEV, &BUFADR, &RECLTH CLEAR X CLEAR A CLEAR S +LDT #4096 TD =X'?1' JEQ *-3 RD =X'?1' COMPR A,S JEQ *+1
UNF - COP - 3221
COP3221 - Fall 1992 Assignment 5 - Third C program DUE: 12/09/92 Your last C assignment is a program to do the following: Parse the argument list. For each argument that is a file, print the file name, date and size on a single line. For each argumen
UNF - CAP - 4630
; -*- Mode: LISP -*-Installation Guide for Common Lisp Maxima on the 3600's William F. SchelterMaking Maxima (Cl-maxima) -> Note this is now largely obsolete. You should follow the instructions for the explorer.-wfsA listing for the tape is enc
UNF - CAP - 94
; -*- Mode: LISP -*-Installation Guide for Common Lisp Maxima on the 3600's William F. SchelterMaking Maxima (Cl-maxima) -> Note this is now largely obsolete. You should follow the instructions for the explorer.-wfsA listing for the tape is enc
UNF - CAP - 4630
/* THIS LITTLE PACKAGE SOLVES FIRST ORDER LINEAR ORDINARY DIFFERENTIAL EQUATIONS SUBJECT TO A BOUNDARY CONDITION (B.C.) AT AN INITIAL POINT THE CALLING PROCEDURE IS IVPSOL(DIFFEQ,Y,X,A,BCEQ); WHERE DIFFEQ IS THE DIFF