Drawing Issues Drawing Coordinate Systems Drawing with Pixels CS-321

Slides:



Advertisements
Similar presentations
In InDesign, you can create a new file by pressing Command/Control-N.
Advertisements

Graphics Shapes. Setup for using graphics You have to import the graphics library You can use either “import graphics” or “from graphics import *” or.
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
30/9/2008Lecture 21 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
Java ThreadsGraphics Programming Graphics Programming: Windows, Viewports & Clipping.
Graphics Pipeline.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 2 1.
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics May 3, 2007.
Chapter 10: Coordinate Systems Chapter 10.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
MORE Cascading Style Sheets (The Positioning Model)
1 Image filtering Hybrid Images, Oliva et al.,
The following slide has the same photo at three resolutions. Each version has been resized in Powerpoint to occupy the entire width of the screen. Remember.
Copyright © 2000 by the McGraw-Hill Companies, Inc. Barnett/Ziegler/Byleen College Algebra: A Graphing Approach Chapter One Functions and Graphs.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
CS 450: Computer Graphics PIXEL AdDRESSING AND OBJECT GEOMETRY
Linear Interpolation, Brief Introduction to OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September.
Two Dimensional Viewing
Buffers Textures and more Rendering Paul Taylor & Barry La Trobe University 2009.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
1 Circle Drawing Algorithms Pictures snagged from
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Learning Unity. Getting Unity
Image Synthesis Rabie A. Ramadan, PhD 7. 2 Image Rasterization.
1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 1 1.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
Attributes of drawing elements
Computer Graphics Rendering 2D Geometry CO2409 Computer Graphics Week 2.
Data Representation The storage of Text Numbers Graphics.
Computer Graphics Camera Projection / Picking CO2409 Week 8 - Optional Advanced Material Not on Exam.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
Midpoint Circle Algorithm
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Rendering Pipeline and Primitive Rasterization.
Lecture 13: Raster Graphics and Scan Conversion
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Vector vs. Bitmap. Vector Images Vector images (also called outline images) are images made with lines, text, and shapes. Test type is considered to be.
Laying out Elements with CSS
Navigating in 3D MAX V part 1.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
11. Viewing Transformations
Webpage layout using CSS
Vector vs. Bitmap.
Adobe Flash Professional CS5 – Illustrated
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Piecewise Functions.
Chapter Three Part I Output Primitives CS 380.
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
CS Computer Graphics Valdosta State University, Spring 2018
The Internet 10/25/11 XHTML Tables
COORDINATE PLANE The plane containing the "x" axis and "y" axis.
Image Processing, Leture #12
Image filtering Hybrid Images, Oliva et al.,
WINDOWING AND CLIPPING
MORE Cascading Style Sheets (The Positioning Model)
Cartesian Coordinate System
WINDOWING AND CLIPPING
Chapter VII Rasterizer
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Image filtering
The following slide has the same photo at three resolutions
Chapter 3 Graphics Output Primitives
Finding Basic Shapes Hough Transforms
Presentation transcript:

Drawing Issues Drawing Coordinate Systems Drawing with Pixels CS-321 11/28/2018 Drawing Issues Drawing Coordinate Systems Drawing with Pixels Dr. Mark L. Hornick

Part 1: Coordinate Systems We have some choices to make when drawing CS-321 Dr. Mark L. Hornick

Which coordinate system should we use? CS-321 11/28/2018 Which coordinate system should we use? Modeling/local coordinates World coordinates Normalized device coordinates Device coordinates Dr. Mark L. Hornick

Modeling/Local Coordinates Convenient for object to be drawn Typical units: meters, feet, etc. Might not be Cartesian (.e.g. polar) floats and doubles are common 10.0m (0,0) 7.5m CS-321 Dr. Mark L. Hornick

World Coordinates Groups of objects are combined Form a complete image Allows prototype objects Drawn in local coordinates Copied, resized and moved into world coordinates Units still feet, meters, etc. Local/Modeling Coordinates 75m 100m World CS-321 Dr. Mark L. Hornick

World coordinates CS-321 Dr. Mark L. Hornick

World coordinates CS-321 Dr. Mark L. Hornick

World coordinates CS-321 Dr. Mark L. Hornick

Normalized Device Coordinates Device-independent Horizontal and vertical ranges of 0 to 1 “Independence” layer between world and various devices Screen (windows of various sizes) Printer Viewport (ch 6 in text) zooming 1 NDC CS-321 Dr. Mark L. Hornick

Device Coordinates DC Actual pixels to draw Allows for movable drawing windows Usually handled by the window system Pixel size (pixels/inch) is relevant Typical processing (xmc,ymc)(xwc,ywc) (xndc,yndc) (xdc,ydc) 1280 1 DC 1024 CS-321 Dr. Mark L. Hornick

How do we go from one coordinate system to another? Transformation of coordinates 2nd half of course Pay attention in MA-383! CS-321 Dr. Mark L. Hornick

Part 2: Drawing with Pixels CS-321 11/28/2018 Part 2: Drawing with Pixels Drawing algorithms we’ve looked at: Point, line, circle, etc. Assume pixel centers as reference Real pixels have finite size Affects graphic primitive rendering Inter-pixel distances are fixed Limited precision CS-321 Dr. Mark L. Hornick Dr. Mark L. Hornick

Pixel Addressing Addressing a pixel by its center leads to problems A pixel occupies a finite space It is not a true “point” Consider a line from (2,1) to (5,1) Actual length = 3 Drawn length = 4 longer than theoretical length 4 CS-321 Dr. Mark L. Hornick 3

Boundary Addressing Address pixels by their “boundaries” 0 1 2 3 4 5 6 7 3 2 1 This “removes” the last pixel CS-321 Dr. Mark L. Hornick

Boundary Addressing We attempt to plot the interior of objects draw pixel if center is inside boundary Still not ideal Pixels are not exactly adjacent –> result too small 6543 2 1 0 1 2 3 4 5 6 7 CS-321 Dr. Mark L. Hornick

Compensating for Pixel Size CS-321 11/28/2018 Compensating for Pixel Size Ignore the problem? May make little difference On 12” screen with 1280 pixels, 1 pixel ~.01” On rectangle 200x300 (60000 pixels) Dropping 1 pixel > (199x299) = 499 pixels (<1% area diff) “Quantization” is most apparent on small elements CS-321 Dr. Mark L. Hornick Dr. Mark L. Hornick