New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

IntroductionComputer Graphics

by: Abe Jones

IntroductionComputer Graphics CS 470

Marketplace > West Virginia University > ComputerScienence > CS 470 > IntroductionComputer Graphics
Abe Jones
GPA 3.77


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 18 page Class Notes was uploaded by Abe Jones on Saturday September 12, 2015. The Class Notes belongs to CS 470 at West Virginia University taught by Staff in Fall. Since its upload, it has received 5 views. For similar materials see /class/202775/cs-470-west-virginia-university in ComputerScienence at West Virginia University.

Similar to CS 470 at WVU

Popular in ComputerScienence


Reviews for IntroductionComputer Graphics


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/12/15
Computer Graphics CS 470 Computer Science and Electrical Engineering Dept West Virginia University November 7 2008 l 0 Scene Graph 39 Outline 0 Scene Graph 0 Introduction 0 Node structure Scene graph A way to represent states and objects in a scene 0 Hierarchical relationships between objects gt Not usually spatial relationships 0 Shared properties and attributes o The de nition is vague gt No single implementation gt Usually application speci c Chassis Righ t Front LeftFront Righ t reor Le Ft reor Wheel wheel wheel Wheel CS 470 West Virginia University Computer Graphics November 739 2008 4 3918quot39 S cene graph The scene graph is a container which holds scene objects The data structure may be a tree or a directed acyclic graph DAG Chasm Chassis Left front Left rear Righ tfront Leftfront Righ treor Le ftreor Wheel wheel wheel wheel nghl39 front Right rear i Wheel I o Directed edges represent parent child relationship 0 The root node has no parent 0 Each node in a tree has 1 parent except root node 0 Each node in a DAG has at least 1 parent except root node gt Multiple instances of the same object can be represented this way CS 470 West Virginia University V November 2008 5 18 Scene graph The object oriented approach nodes and sometimes edges are objects 0 Scene objects inherit from node or edge base class 0 Overloaded member functions 0 Some member functions recursively traverse tree in some order usually depth rst l arm arm leg leg M Mr Leftlower Rig ht Iower Leftlower Righ t Iower leg leg Head I Leftupper I RightUpperl Leftupper I Rightupperl M M a rig CS 470 West Virginia University 1 quot V 397 November 7 2008 6 18 Scene Graph Node structure Graph Nodes Procedural Approach Children CS 470 West Virginia University a Coputer Graphics struct treenode GLfloat m16 void f struct treenode sibling struct treenode Child o m16 transforation matrix 0 f pointer to render function 0 sibling child pointers which maintain the structure NeVember 1792008 7 1839 Node structure Graph Nodes Objectoriented Approach A more general framework for encapsulating data and methods which manipulate and display the data Good candidates for objects in the scene graph 0 Materials 0 Lights 0 High level geometrical objects Good candidates for methods 0 Render 0 Animate o Respond to input N ve39r nber 2008 8 ME Scene Graph Node structure Graph Nodes Objectoriented Approach Scene I Separator Separator Color I Translate I Obiectl I Translate I Obiect3 I Rotate I Translate I Rotate I Obiect 2 I Node can encapsulate 0 Material properties 0 Transformations o Objects 0 Lights 0 Render states CS 470 West Virginia University Computer Graphics N0 tuber 7 91 l Node structure Program organization At initialization o Read scene le 0 Construct objects 0 Build scene graph At runtime a display callback traverse the tree and render nodes 0 idle callback traverse tree and animate nodes 0 user input callback message passing or tree traversal I 1 1018 I Noaig signature Existing scenegraph APIs 0 Open Inventor o OSG Open Scene Graph 0 NVSG NVidia Scene Graph 0 OGRE Objectoriented graphics rendering engine I 31118 o gg gonna Node class from Angel book class Node public Node virtual NNode virtual void Render void AddChildNode k private void Traverse Node LeftChild Node Rightsibling friend class GLViewer I e rsmmsture Scene graph building void NodezzAddChildNode node ifLeftChildNULL LeftChildnode else nodeigtRightSiblingLeftChild LeftChildnode I o grsgguctm Scene graph traversal void NodeTraverse ifKeepMatriX glPushMatriX Render ifLeftChildNULL LeftChildigtTraverse ifKeepMatriX glPopMatriX ifRightSiblinglNULL RightsiblingigtTraverse Example node types class Color public Node private bool Changed float Color3f3 void ColorRender ifChanged glColorvaColor3f I o e s game Example node types class Materlal publlc Node prlva te bool changed5 void Materlal Render 1fChanged0 glMaterlalfvGLiFRONTiANDiBACK GLiAMBIENT Ambientm 1fChangedl glMate alfvGL7FRONT7ANDiBACK GLiDIFFUSE lefuse 1fChanged2 glMaterlalfvGLiFRONTiANDiBACK GLisPECULAR Specular 1fChanged3 glMaterlalfvGLiFRONTiANDiBACK GLiEMISSION Emlsslon 1fChanged 4 g1MatenalfGLJRowLANDJACK GLisHININESSV Shlnlness I may anytime class Geometry publlc Node protected Color esolorwode Drawstyle sstylewode class Sphere publlc Geometry prlvate float Radlus H vold Sphere Rendero glPushAttrlb GLiALLiATTRIBiBITS 1f ColorNode Colorwodeemender 0 1f MatNo 6 Math dergtRender 0 1f Trans ode Trsnswodeegtkender 0 1f styleNode stylewodeegtkender 0 glutSolldSphere derus 40 40 glPopAttrlb 0


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Kyle Maynard Purdue

"When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the I made $280 on my first study guide!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.