Unformatted text preview:

Wire-frame Modeling3D modelsExample: the basic barn3D-coordinatesPerspective ProjectionThe projectionSimilar TrianglesProjection: side-viewProjection: top-viewThe projection equationsAny fixups needed?animationsmooth wire-frame animationsSuperVGALimitations of VGAVGA Modes 18 and 19IBM competitorsVESAVESA Bios Extensions v3.0Wire-frame ModelingAn application of Bresenham’s line-drawing algorithm3D 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 barn10 corner-points (“vertices”) 15 line-segments (“edges”)3D-coordinates Front vertices Back verticesV0=( 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 effectThe projectionP(x,y,z)P*(x*,y*,0)X-axisY-axisZ-axisEye of viewer (0,0,D)View-planeD = distance of eye from view-planeSimilar TrianglesabcABCCorresponding sides have proportional lengthsa / A = b / B = c / CProjection: side-viewP(x,y,z)P*(x*,y*,0)View-planeZ-axisDzyy*By similar triangles:y* / y = D / (D – z)So y* = y / ( 1 – z / D )EyeProjection: top-viewZ-axisxx*DzP( 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 viewplaneAny 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 movementssmooth 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)SuperVGAThe problem of “standards” for enhanced PC graphics hardwareLimitations 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 64KBVGA 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-colors0IBM 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=480000 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 manufacturerVESA 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


View Full Document

USF CS 686 - Wire-frame Modeling

Documents in this Course
Load more
Download Wire-frame Modeling
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Wire-frame Modeling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Wire-frame Modeling 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?