CSE 557: Impressionist Help Session Keith Grochow.

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

CSE 457 Modeler Help Session Lovingly brought to you by: TA Steve.
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.
Managing Your Learners In this guide you will learn how to: Add classes to the Manage Your Learners page Add learners to the Manage Your Learners page.
CS 4731 Lecture 2: Intro to 2D, 3D, OpenGL and GLUT (Part I) Emmanuel Agu.
Lab 1: OpenGL Tutorial CS 282. What’s the plan for today? Go over our framework code. Learn some basic OpenGL! Reveal Lab 1 Answer questions.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
Animating With Blender Topics: Making a skeleton. Making a skeleton. Attaching the skeleton to your model. Attaching the skeleton to your model. Posing.
Project 1: Impressionist Help Session And your friendly neighborhood TA is… Young-Mi.
OpenGL (I). What is OpenGL (OGL)? OGL is a 3D graphics & modeling library Can also use it to draw 2D objects.
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
OpenGL Help Session CS248 Fall 2006 Zhengyun Zhang.
Project 1: Impressionist Help Session Jonathan Su
CSE 457: Impressionist Help Session...And Your Friendly TA is: Steve Martin.
Inventory Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic or Figure.
Using Journal and Other Tablet PC Tools. Outcomes Software  Intro to Sticky Notes  Intro to Ink Desktop  Intro to using Windows Journal Tools and uses.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Graphics Programming and OpenGL.
CAP4730: Computational Structures in Computer Graphics Introduction to OpenGL.
COS 397 Computer Graphics Assoc. Prof. Svetla Boytcheva AUBG 2013 COS 397 Computer Graphics Practical Session №1 Introduction to OpenGL, GLFW and CG.
Drawing Basic Graphics Primitives Lecture 4 Wed, Sep 3, 2003.
Introduction to OpenGL and GLUT GLUT. What is OpenGL? An application programming interface (API) A (low-level) Graphics rendering API Generate high-quality.
FLTK Tutorial.
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
CS 450: COMPUTER GRAPHICS PORTRAIT OF AN OPENGL PROGRAM SPRING 2015 DR. MICHAEL J. REALE.
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.
Downloading and Installing Autodesk Revit 2016
FLTK. Objectives Install and Use FLTK Widgets ◦Callbacks Handling event ◦System events ◦Mouse events ◦Keyboard events.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
Modeling with OpenGL Practice with OpenGL transformations.
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.
Project 1: Impressionist Help Session. The Skeleton Code.
NoufNaief.net TA: Nouf Al-harbi.
NoufNaief.net 1 TA: Nouf Al-Harbi.
Photoshop Actions Lights, Camera, Actions in Photoshop.
Project 1: Impressionist Help Session Zinnia Zheng
Introduction to OpenGL Muhammad Aamir Khan Lecturer, DCS, UOP.
Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs.
Use of a Peer Notetaker Accommodation If you receive “Use of a Peer Notetaker” as an accommodation this tutorial will show you how to implement that accommodation.
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
CSE 457: Impressionist Help Session...And Your Friendly TA is: Siobhan Quinn.
From the main PGCC Web page, select "Faculty & Staff"
FLTK The Fast Light Toolkit
Project 1: Impressionist Help Session
Adding Assignments and Learning Units to Your TSS Course
OpenGL (Open Graphics Library) Mr. B.A.Swamy Assistant Professor Dept of CSE.
Project 1: Impressionist Help Session
Project 1: Impressionist Help Session
Help Session . . .And Your Friendly TA is: Andrew Stoneman
Outline Announcements Dynamic Libraries HWII on web, due Friday
Give2GROW For Nonprofits.
Project 1: Impressionist Help Session
Modeler Help Session CSE 457, Autumn 2008
Modeler Help Session CSE 457, Spring 2006
Drawing in the plane 455.
Project 1: Impressionist Help Session
Modeler Help Session CSE 457, Spring 2005
Modeler Help Session CSE 457, Autumn 2007
OpenGL program.
Modeler Help Session CSE 457, Spring 2008
Modeler Code Basics CSE P 557, Autumn 2006
Announcements How to save your work? Quiz solution 5/5/2019
Modeler Help Session CSE 457, Spring 2007
Project 1: Impressionist Help Session
Prepared by your friendly, phantom TA Jennifer
Presentation transcript:

CSE 557: Impressionist Help Session Keith Grochow

What we’ll be going over Getting Set Up The Skeleton Code OpenGL Basic FLTK How to make a new brush. Filter kernel info Basic Photoshop (artifacts, plus check your work!) Good References for Project 1 Q&A

3 Environments (well 2 and a half) MSVC This is what I’m most familiar with.NET (MSVC++ 7.0) Need to convert to new project format Linux Equivalent to MSVC environment Not my strength

The Skeleton Code

The Skeleton Code, part deux 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. 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: 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 It is extremely well documented. Lots of online solutions available – see Google 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.

Drawing with openGL That said, how to draw an actual primitive? Lets do an example: a filled triangle. (why will you need this later...?) 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 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. For those who have used Tk before, the structure of it is really similar. (I’ve been told)

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(); }

Where to get FLTK Help References linked on web page. There are a lot of function calls!! Widget-specific code directly commented into ImpressionistUI.cpp! No help session on copying and pasting... Ask the TA

How to Make a Brush Now that we’ve got all the background, lets make a brush! And because I’m mean, lets make one that isn’t required. Presenting...triangleBrush! Because we’re lazy, lets 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, continued... 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, continued 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, continued 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();

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? (you tell me) What cases should we handle? We will be looking closely at your filter kernel...

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!

Good References Books around the lab and on Web The Red/Blue OpenGL Bibles, and Erik’s books Class Web Lots of references linked there Google – of course Me – class, , pub

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