Wire-frame Modeling An application of Bresenham’s line-drawing algorithm.

Slides:



Advertisements
Similar presentations
VGA Text Mode An introduction to font selection and to reprogramming of the Character Generator ram.
Advertisements

Display Devices Display device: output device that presents output visually Monitor/Display screen: The display device used with desktop computers, notebook.
Go through this show in OpenOffice Impress by using the right scrollbar or clicking individual slide thumbnails on the left side. This hands-on demo is.
Early PC Graphics Capabilities of the IBM Color Graphics Adapter (CGA) and Enhanced Graphics Adapter (EGA)
CS 686: Programming SuperVGA Graphics Devices Introduction: An exercise in working with graphics file formats.
Programming Super-VGA Graphics Devices Introduction to VESA graphics modes and to organization of the linear frame-buffer memory.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Hidden Line Removal Applying vector algebra to the problem of removing hidden lines from wire-frame models.
The CRT Controller How to modify CRTC registers to achieve a non-standard horizontal and vertical screen resolution.
Michener’s Algorithm An efficient scheme for drawing circles (and filling circular disks) on a raster graphics display.
X86 and 3D graphics. Quick Intro to 3D Graphics Glossary: –Vertex – point in 3D space –Triangle – 3 connected vertices –Object – list of triangles that.
Hardware Evaluation and Selection James D. Lehman Educational Technology Purdue University.
A code-walkthrough Commentary on our ‘model3d.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
Early PC Graphics Capabilities of the IBM Color Graphics Adapter (CGA) and Enhanced Graphics Adapter (EGA)
Vertical Retrace Interval An introduction to VGA techniques for smooth graphics animation.
Drawing Lines The Bresenham Algorithm for drawing lines and filling polygons.
Three-Dimensional Concepts
EET Advanced Digital Display Adapters. A vital part to the system provides the visual part of the Human/Computer interface In boot process, goes.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 40 – Displays and Resolution.
Computer Monitors Principles of Information Technology Lytle High School Click to Continue.
The Pythagorean Theorem x z y. For this proof we must draw ANY right Triangle: Label the Legs “a” and “b” and the hypotenuse “c” a b c.
Digital Graphics and Computers. Hardware and Software Working with graphic images requires suitable hardware and software to produce the best results.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
1 Chapter Overview CD-ROM and DVD Drives Advanced Hard Disk Drives SCSI Drives.
Unit 30 P1 – Hardware & Software Required For Use In Digital Graphics
The UM Institute of Technology
Polygon Shading. Assigning color to a shape to make graphical scenes look realistic, or artistic, or whatever effect we’re attempting to achieve But first.
Chapter 14: Simulation, Graphics, and Other Applications Chapter 14 Simulation, Graphics, and Other Applications Page 148 In order to gain insight into.
Display adapters Introduction Display adapter is a circuit board. This is used to convert the raw data to image data (video signal) that.
Grafis 3D. What is 3D?  3D Image x, y, z Tell a story, more information  2D Image x, y Communicate something simple (ie. cheat)
By: Kellen Freeman, Chase Perez, and Gage Green. We are doing this presentation on video cards. You will probably hear about computer parts that you might.
UniS CS297 Graphics with Java and OpenGL Introduction.
CSE 381 – Advanced Game Programming Basic 3D Graphics
A Short History of the PC. Prolog Before the IBM, there were many PC vendors. –These were typically garage-shop start-ups with shaky financing. –The big.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
Classification of Computers
Architecture Examples And Hierarchy Samuel Njoroge.
One-Point Perspective Yevgeny Shnaper. About One-Point Perspective One-point perspective consists of ONE vanishing point on a horizon line. Horizon: a.
Multimedia Software Tools. 3-D Modeling and Animation Tools 3-D modeling gives images a 3-dimensional look. It can be used along with animation, for instance,
Video Monitor CRT: Cathode Ray Tube
Output Devices. Printers Factors affecting choice Volume of output High volume require fast, heavy-duty printer Quality of print required Location of.
Two-Point Perspective
Capabilities of Software. Object Linking & Embedding (OLE) OLE allows information to be shared between different programs For example, a spreadsheet created.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Video Card CES Industries, Inc. Lesson 10.  Translates computer information of binary digital data into visual information that the monitor can understand.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Multimedia Systems Hardware & Software. Table of Content 1.Categories of multimedia systems 2.Categories of multimedia devices 3.Evolution of multimedia.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Computer Graphics & Multimedia
Input/Output Organization III: Commercial Bus Standards CE 140 A1/A2 20 August 2003.
System Bus.
Digital Media Dr. Jim Rowan ITEC 2110 Chapter 3. Roll call.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
Lecture 11 Text mode video
WELCOME. Skills and Techniques - Session 2 Skills and Techniques Booting from Windows 8.1 and Windows 10 devices.
Computer Graphics Lecture 03 Graphics Systems Cont… Taqdees A. Siddiqi
Flowchart of basic interrupt mechanism
VIDEO GRAPHICS ARRAY CARD (VGA CARD)
Computer Graphics: An Introduction
Computer Graphics Lecture 32
Perspective Linear Perspective: creating the illusion of 3-dimensional space on a 2-dimensional surface. A horizon line, vanishing point and perspective.
1. Encode binary value using PCM
Graphics Systems Lecture-2
Introduction to Meshes
Presentation transcript:

Wire-frame Modeling An application of Bresenham’s line-drawing algorithm

3D models Simple objects from the world around us can be depicted as “wire-frame models” We make a list of the “key” points (usually corners) on the object’s outer surface and a list of all the lines that connect them The “key” points are called “vertices” The connecting lines are called “edges” We create a file that contains this “data”

Example: the basic barn 10 corner-points (“vertices”) 15 line-segments (“edges”)

3D-coordinates Front verticesBack vertices V0=( 0.5, 0.5, 0.5 ) V1=( 0.5, 0.5, -0.5 ) V2=( 0.5, -0.5, 0.5 ) V3=( 0.5, -0.5, -0.5 ) V4=( -0.5, -0.5, 0.5 ) V5=( -0.5, -0.5, -0.5 ) V6=( -0.5, 0.5, 0.5 ) V7=( -0.5, 0.5, -0.5 ) V8=( 0.0, 1.0, 0.5 ) V9=( 0.0, 1.0, -0.5 )

Perspective Projection We imagine the computer display screen is located between the wireframe model and the eye of someone who’s viewing it Each vertex is “projected” onto the screen We use Bresenham’s algorithm to draw line-segments that connect the projections A “demo program” will show this effect

The projection P(x,y,z) P*(x*,y*,0) X-axis Y-axis Z-axis Eye of viewer (0,0,D) View-plane D = distance of eye from view-plane

Similar Triangles a b c A B C Corresponding sides have proportional lengths a / A = b / B = c / C

Projection: side-view P(x,y,z) P*(x*,y*,0) View-plane Z-axis D z y y* By similar triangles: y* / y = D / (D – z) So y* = y / ( 1 – z / D ) Eye

Projection: top-view Z-axis x x* D z P( x, y, z ) P*( x*, y*, 0 ) By similar triangles: x* / x = D / ( D – z ) So: x* = x / ( 1 – z / D )

The projection equations Point P( x, y, z ) in 3D-world is “mapped” to pixel P*( x*, y* ) in the 2D-viewplane: x* = x / ( 1 – z / D ) y* = y / ( 1 – z / D ) Here D is distance of eye from viewplane

Any fixups needed? If the projected image is too small or too big, it can be “rescaled”: x’ = x*(scaleX); y’ = y*(scaleY); If the projected image is “off-center”, it can be “shifted” (left or right, up or down): x” = x’+shiftX; y” = y’+shiftY;

animation The wire-frame model can be moved (or the viewer’s eye can be moved) to show an object from different viewing angles By redrawing a series of different views in rapid succession, the illusion of animation can be achieved But erasing and then redrawing a complex object can produce “flickering” that spoils the impression of smooth movements

smooth wire-frame animations Advanced hardware techniques can be employed to eliminate any “flickering” One such technique is “page-flipping” It makes use of the extra graphics VRAM But it may require us to learn more about the Super VGA hardware designs And here we must confront the issue of graphics “standards” (or the lack thereof)

SuperVGA The problem of “standards” for enhanced PC graphics hardware

Limitations of VGA VGA’s architecture was designed by IBM It was targeted for IBM’s PC/AT machines These used Intel’s 8086/8088/80286 cpus Operating system was PC-DOS/MS-DOS DOS was built to execute in “real-mode” So address-space was limited to 1MB VRAM was confined to 0xA0000-0xBFFFF Graphics-mode VRAM was only 64KB

VGA Modes 18 and 19 Design-goals of VGA mode 18: higher screen-resolution (640x480, 4bpp) and “square” pixels (16 colors) Design-goals of VGA mode 19: higher color-depth (320x200, 8bpp) and “linear” addressing (256 colors) Also “backward compatibility” with CGA/EGA: –CGA mode 6: 640x200, 1bpp (2-colors) –CGA mode 5: 320x200, 2bpp (4-colors) –EGA mode 16: 640x350, 4bpp (16-colors0

IBM competitors Others sought a marketing advantage Their engineers devised ways to get more colors and/or higher screen-resolutions Example: 800x600 with 4bpp (16-colors) Offers “square” pixels and 64K addressing 800x600= pixels (“planar” memory) But every competitor did it their own way! So PC graphics software wasn’t “portable”

VESA Video Electronics Standards Association An industry consortium to setup standards Their idea: provide a uniform programming interface for Super VGAs via the firmware Applications would not directly program the incompatible graphics hardware, but would call standard ROM-BIOS functions supplied in firmware by each manufacturer

VESA Bios Extensions v3.0 Copy of the standards document is online It defines a programming interface for the essential and the most-needed functions Examples: setting various display-modes, querying the hardware’s capabilities, and enabling SuperVGA functionalities Reading assignment: study ‘vbe3.pdf’