Project 1: Impressionist Help Session Jonathan Su

Slides:



Advertisements
Similar presentations
Using Journal and Other Tablet PC Tools. Tools Bars in Journal To access all tool bars click on view and select each tool bar to activate each.
Advertisements

KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
Microsoft ® Office PowerPoint ® 2003 Training Package to a CD Your STS, Tom Redd, presents:
CSE 557: Impressionist Help Session Ian Simon. What we’ll be going over Getting Set Up The Skeleton Code OpenGL Basic FLTK How to make a new brush Good.
Animating With Blender Topics: Making a skeleton. Making a skeleton. Attaching the skeleton to your model. Attaching the skeleton to your model. Posing.
CSE 557: Impressionist Help Session Keith Grochow.
Project 1: Impressionist Help Session And your friendly neighborhood TA is… Young-Mi.
Modeler Help Session CSE 457, Spring 2006 Modeler Due: Thursday, October 26th Modeler Artifact Due: Monday, Oct. 30th Project TA: Sierra
Painterly Rendering CMPS Assignment 2. OpenGL OpenGL is a cross-language, cross- platform specification defining and API for 2D and 3D graphics.
Modeler Help Session CSE 457, Fall 2005 Modeler Due: Oct 28, Friday Modeler Artifact Due: Oct 31, Monday Project TA: Jeremy
CSE 457: Impressionist Help Session...And Your Friendly TA is: Steve Martin.
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
ABC’s of PowerPoint (Office 2007) Part 1: Basic Vocabulary Part 2: Cursors Part 3: Insert Your Text Part 4: Insert Your Pictures Part 5: Basic Tools &
Inventory Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic or Figure.
Created in 2011 at Liberty High School. Getting Started Overview on Magnet Tool – Graphics – Text – Image – Video – Sound – Wall A Sample Glog How to.
Downloading and Installing PAF Insight PAF Insight can be easily downloaded Or can be installed from a CD A license is needed t0 activate the program.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
CAP4730: Computational Structures in Computer Graphics Introduction to OpenGL.
USING REFWORKS Fall What is RefWorks? A web-based bibliographic and database manager Creighton University faculty, students, and staff have access.
Welcome to Minnesota’s eFolio Rochester Workforce Center September 12, 2003 Norman Baer Matthew St. Martin.
Using School fusion A great interactive tool to aid in communication for students, parents and YOU!!! Property of TSVest 2006.
How To: Add HYPERLINKS and IMAGES with HYPERLINKS to your Outlook Signature. By: Tom Jackson
Introduction to OpenGL and GLUT GLUT. What is OpenGL? An application programming interface (API) A (low-level) Graphics rendering API Generate high-quality.
File Upload Competitive Analysis. Catalyst - Browse in-line Of interest:
FLTK Tutorial.
Microsoft ® Office SharePoint ® Server 2007 Training SharePoint document libraries II: All about checkout Bellwood-Antis School District presents:
Hyperlinks Tech Tuesday November 27, 2001 Lausanne Collegiate School.
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first four.
SharePoint document libraries I: Introduction to sharing files Sharjah Higher Colleges of Technology presents:
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first 4.
Modeler Help Session CSEP 557, Spring Help Session Overview The Modeler Application Modeler Code Overview Constructing Your Model Hierarchical Modeling.
CD2012 Principles of Interactive Graphics Lecture 01 Introduction Abir Hussain (Rome: 6.33,Tel , Web:
PowerTeacher with Web Grade Book Semester Classes School Year August 2012.
Creating an Effective PowerPoint Presentation
Downloading and Installing Autodesk Revit 2016
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
HTML Concepts and Techniques Fifth Edition Chapter 6 Using Frames in a Web Site.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
Modeling with OpenGL Practice with OpenGL transformations.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
Go to your school’s web locker site Your user name is the first letter of your first name, the first four letters of.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Introduction to OpenGL and GLUT. What’s OpenGL? An Application Programming Interface (API) A low-level graphics programming API – Contains over 250 functions.
Applying the IEEE Template to a Presentation
Helping Patrons Get the Most from Their E-Readers Gary Pilkington and Lesley Daley Kenton County Public Library.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
When collaborating, it is important to manage changes in the models. For example: –To create or edit a submodel E.g. Habitat suitability is replaced with.
Project 1: Impressionist Help Session. The Skeleton Code.
Project 1: Impressionist Help Session Zinnia Zheng
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
TechKnowlogy Conference August 2, 2011 Using GoogleDocs for Collaboration.
CSE 457: Impressionist Help Session...And Your Friendly TA is: Siobhan Quinn.
Weebly Elements, Continued
Project 1: Impressionist Help Session
Project 1: Impressionist Help Session
Project 1: Impressionist Help Session
Help Session . . .And Your Friendly TA is: Andrew Stoneman
Project 1: Impressionist Help Session
Using Photoshop for IED
Modeler Help Session CSE 457, Autumn 2008
Modeler Help Session CSE 457, Spring 2006
Project 1: Impressionist Help Session
Modeler Help Session CSE 457, Spring 2005
Lets Build a Nearpod An Idea that Rocks.
Modeler Help Session CSE 457, Autumn 2007
OpenGL program.
Debugging Taken from notes by Dr. Neil Moore
Modeler Help Session CSE 457, Spring 2008
Modeler Help Session CSE 457, Spring 2007
Project 1: Impressionist Help Session
Presentation transcript:

Project 1: Impressionist Help Session Jonathan Su

What we’ll be going over: CVS: How to use it. The Skeleton Code: Live and Uncut! What on earth is openGL (and why doesn’t it work)? Basic FLTK Hint #1: How to make a new brush. Committing the changes you made. Hint #2+: Filter kernel dos and don'ts Basic Photoshop (artifacts, plus check your work!) Good References for Project 1 How to set up MSVC.NET from home (or, the other labs) Q&A

CVS: The Basics Set up space… done for you! Import the code… also done for you! Check out a local copy Right-click on CVS Checkout, enter the proper repository and module and BAM! You’re done! Make some changes (we’ll see this later on in the session) Commit your code (also will be seen later on in the session)

The Skeleton Code

The Skeleton Code cont’d ImpressionistDoc  This class handles all of the document-related stuff, like loading/saving, etc. ImpressionistUI  This class handles all of the UI stuff, such as getting values from sliders, setting up the window, etc. PaintView  This class handles drawing the side of the window the user paints on.  A lot of event handling is done here (so here look for examples). OriginalView  This class handles the other side of the window. ImpBrush  This is the virtual class all brushes are derived from. PointBrush  This is an example brush that draws points.

Meet your new friend (or enemy): openGL OpenGL is a great environment for PC 2d/3d graphics applications.  It is one among many others, such as DirectX, Glide, Allegro, etc. Very easy to start working with—trust me!  It is extremely well documented. We will be using it throughout the quarter. Project 1 uses just the basics of openGL.  Although you’re welcome to learn more on your own, the focus of the project is on 2d image manipulation.

How openGL Works openGL draws primitives—lines, vertexes, or polygons—subject to many selectable modes. It can be modeled as a state machine  Once a mode is selected, it stays there until turned off. It is procedural—commands are executed in the order they’re specified. The coordinate system in which it draws is transformed using function calls.  glRotate, and why it might be confusing (right now).  The matrix stack.  This will all be covered in detail in the modeler help session!

Drawing with openGL That said, how to draw an actual primitive?  Lets do an example: a filled triangle. First, set your color: glColor3f( red, green, blue ); Now, tell openGL to begin drawing: glBegin( GL_POLYGON ); Specify vertices A, B, and C. Since we’re drawing in an image, use integers. glVertex2i( Ax, Ay ); glVertex2i( Bx, By ); glVertex2i( Cx, Cy ); Close the openGL block. glEnd(); Force openGL to draw what you specified now. glFlush(); // don't forget this!

FLTK: Diet Win32 Stands for Fast Light ToolKit.  A really handy cross-platform windowing system. Completely Event-driven (via callbacks).  The window setup code is run, and then the main loop is called. (we’ll look at an example in a second)  All further events are handed out to callbacks. New version has been released (fltk 1.1.7)

FLTK Example code This code is taken/modified directly from fltk.org: #include This code is executed in order: int main(int argc, char **argv) { Fl_Window *window = new Fl_Window(300,180); Fl_Box *box = new Fl_Box(20,40,260,100,"Hello, World!"); Run functions registered to Fl_Box on the box you created: box->box(FL_UP_BOX); box->labelsize(36); box->labelfont(FL_BOLD+FL_ITALIC); box->labeltype(FL_SHADOW_LABEL); window->end(); window->show(argc, argv); This is where we hand control of our program to FLTK. Anything that happens now is the result of a callback. return Fl::run(); }

How to Make a Brush Now that we’ve got all the background, lets make a brush!  Presenting...triangleBrush! (Note: This will NOT count towards extra credit) Easiest way to do this: make a copy of pointBrush.h/cpp and rename them triangleBrush.h/cpp. Add them to the impressionist project. Go through the code and change all pointBrush labels to triangleBrush.

Brushmaking, cont’d Now, open up ImpressionistDoc.cpp Add triangleBrush.h to the includes Scroll down a bit, and add triangleBrush to the selectable brushes. Pick a constant for it. Go to ImpBrush.h and add the constant for triangleBrush to the enum. Go to impressionistUI.cpp, and add the triangle brush to the brush menu.

Brushmaking, cont’d again Run Impressionist. See the triangle brush.  And, well, see the triangle brush make points instead of triangles. Open triangleBrush.cpp and go to BrushMove.  Here’s what’s there now: glBegin( GL_POINTS ); SetColor( source ); glVertex2d( target.x, target.y ); glEnd(); Triangles need 3 vertices. Lets center ours around the target point where the user clicked. How do we do this?

Brushmaking, cont’d again We do it like so: int size = pDoc->getSize(); int Ax,Ay,Bx,By,Cx,Cy; Ax = target.x - (.5*size); Bx = target.x + (.5*size); Cx = target.x; Ay = target.y - (.5*size); By = target.y - (.5*size); Cy = target.y + (.5*size); glBegin( GL_POLYGON ); SetColor( source ); glVertex2i( Ax, Ay ); glVertex2i( Bx, By ); glVertex2i( Cx, Cy ); glEnd();

Commit your changes Now that we’ve made some changes, we should commit them back to the repository. We can do this by right-clicking on the folder and choosing CVS Add Contents Then we can click CVS Commit Wasn’t that easy?

Filter Kernel Hints Remember how filter kernels are applied to an image.  Look at sample program. How does it apply a filter?  What could go wrong?  What cases should we handle? We will be looking closely at your filter kernel... Very closely

OpenGL Debugging Hints One thing that might help is to be checking for errors after each call. When it seems like nothing is happening, OpenGL is often returning an error message somewhere along the line. The begin-end block is a good possibility, and if that's the problem there will be an error code returned. GLenum error_flag; error_flag = glGetError(); if (error_flag != GL_NO_ERROR) { printf("Error: %1s (%i) in %1s.\n",gluErrorString(error_flag),error_flag,"method name"); }

Basic Photoshop How to check your work...  Filter kernel in Photoshop: Go to Filter->Other->Custom  Median filter in Photoshop: Go to Filter->Noise->Median How to resize your artifact...  Go to Image->Image Size  Don’t forget to save as a jpeg!

Setting up FLTK from home Download fltk from the course webpage Put it wherever you think is convenient (say, C:\fltk-1.1.7) Open up the impressionist project From tools, select options Go to the projects tab and select VC++ directories Under “show directories for” choose “Include files” Create a new directory as the fltk folder (in my case, C:\fltk-1.1.7) Under “show directories for” choose “Library files” Create a new directory for fltk\lib (in my case, C:\fltk-1.1.7\lib) This is all on the website, so don’t need to copy it down

Good References Books around the lab!!  The Red/Blue OpenGL Bibles Class Web  Lots of references linked there! Google Your TAs

Questions...? Ask ‘em now Or me later Or check the web page for good ways to contact your staff.