3D vector computer graphics

Similar documents
R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Analysis of Continuous Beams in General

Mathematics 256 a course in differential equations for engineering students

TN348: Openlab Module - Colocalization

Lecture 5: Multilayer Perceptrons

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

A Binarization Algorithm specialized on Document Images and Photos

Slide 1 SPH3UW: OPTICS I. Slide 2. Slide 3. Introduction to Mirrors. Light incident on an object

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Tsinghua University at TAC 2009: Summarizing Multi-documents by Information Distance

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Image Representation & Visualization Basic Imaging Algorithms Shape Representation and Analysis. outline

MULTISPECTRAL IMAGES CLASSIFICATION BASED ON KLT AND ATR AUTOMATIC TARGET RECOGNITION

VISUAL SELECTION OF SURFACE FEATURES DURING THEIR GEOMETRIC SIMULATION WITH THE HELP OF COMPUTER TECHNOLOGIES

Parallelism for Nested Loops with Non-uniform and Flow Dependences

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Reducing Frame Rate for Object Tracking

CMPS 10 Introduction to Computer Science Lecture Notes

PHYS 219 Spring semester Lecture 20: Reflection of Electromagnetic Radiation: Mirrors and Images Formed by Mirrors

2D Raster Graphics. Integer grid Sequential (left-right, top-down) scan. Computer Graphics

Feature Reduction and Selection

Model Clipping Triangle Strips and Quad Meshes.

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

APPLICATION OF AN AUGMENTED REALITY SYSTEM FOR DISASTER RELIEF

Optimization Methods: Integer Programming Integer Linear Programming 1. Module 7 Lecture Notes 1. Integer Linear Programming

An Optimal Algorithm for Prufer Codes *

SENSITIVITY ANALYSIS IN LINEAR PROGRAMMING USING A CALCULATOR

Accelerating X-Ray data collection using Pyramid Beam ray casting geometries

Delayed Features Initialization for Inverse Depth Monocular SLAM

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

REFRACTION. a. To study the refraction of light from plane surfaces. b. To determine the index of refraction for Acrylic and Water.

Structure from Motion

Any Pair of 2D Curves Is Consistent with a 3D Symmetric Interpretation

Wishing you all a Total Quality New Year!

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

Array transposition in CUDA shared memory

Real-time Motion Capture System Using One Video Camera Based on Color and Edge Distribution

An Image Fusion Approach Based on Segmentation Region

Recognizing Faces. Outline

Improvement of Spatial Resolution Using BlockMatching Based Motion Estimation and Frame. Integration

y and the total sum of

A Comparison and Evaluation of Three Different Pose Estimation Algorithms In Detecting Low Texture Manufactured Objects

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation

Some Tutorial about the Project. Computer Graphics

Support Vector Machines

Shape Representation Robust to the Sketching Order Using Distance Map and Direction Histogram

FEATURE EXTRACTION. Dr. K.Vijayarekha. Associate Dean School of Electrical and Electronics Engineering SASTRA University, Thanjavur

Loop Permutation. Loop Transformations for Parallelism & Locality. Legality of Loop Interchange. Loop Interchange (cont)

Chapter 4. Non-Uniform Offsetting and Hollowing by Using Biarcs Fitting for Rapid Prototyping Processes

Computer models of motion: Iterative calculations

Active Contours/Snakes

Outline. Discriminative classifiers for image recognition. Where in the World? A nearest neighbor recognition example 4/14/2011. CS 376 Lecture 22 1

Solutions to Programming Assignment Five Interpolation and Numerical Differentiation

On Some Entertaining Applications of the Concept of Set in Computer Science Course

Proper Choice of Data Used for the Estimation of Datum Transformation Parameters

AP PHYSICS B 2008 SCORING GUIDELINES

The Research of Ellipse Parameter Fitting Algorithm of Ultrasonic Imaging Logging in the Casing Hole

A DATA ANALYSIS CODE FOR MCNP MESH AND STANDARD TALLIES

Distance Calculation from Single Optical Image

High level vs Low Level. What is a Computer Program? What does gcc do for you? Program = Instructions + Data. Basic Computer Organization

An Iterative Solution Approach to Process Plant Layout using Mixed Integer Optimisation

A Gradient Difference based Technique for Video Text Detection

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

A Gradient Difference based Technique for Video Text Detection

1. Answer the following. a. A beam of vertically polarized light of intensity W/m2 encounters two polarizing filters as shown below.

3D Virtual Eyeglass Frames Modeling from Multiple Camera Image Data Based on the GFFD Deformation Method

CHAPTER 3 ENCODING VIDEO SEQUENCES IN FRACTAL BASED COMPRESSION. Day by day, the demands for higher and faster technologies are rapidly

A New Approach For the Ranking of Fuzzy Sets With Different Heights

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE

Image Fusion With a Dental Panoramic X-ray Image and Face Image Acquired With a KINECT

CS 231A Computer Vision Midterm

Fitting & Matching. Lecture 4 Prof. Bregler. Slides from: S. Lazebnik, S. Seitz, M. Pollefeys, A. Effros.

Operator's Manual EU4 / EU6 / EU8. External Unwinder. Made in Germany

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

CS 231A Computer Vision Midterm

DESIGN OF VERTICAL ALIGNMET

Face Detection with Deep Learning

ANIMATED TOOLS FOR ILLUSTRATION, DEMONSTRATION AND STUDY OF GEOMETRIC RELATIONS IN PHOTOGRAMMETRY AND REMOTE SENSING USING MS-EXCEL

THE THEORY OF REGIONALIZED VARIABLES

Parallel Computation of the Functions Constructed with

Fast Feature Value Searching for Face Detection

A high precision collaborative vision measurement of gear chamfering profile

Programming in Fortran 90 : 2017/2018

Resolving Ambiguity in Depth Extraction for Motion Capture using Genetic Algorithm

Report on On-line Graph Coloring

Edge Detection in Noisy Images Using the Support Vector Machines

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

arxiv: v1 [cs.ro] 8 Jul 2016

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Introduction to Geometrical Optics - a 2D ray tracing Excel model for spherical mirrors - Part 2

Exterior Orientation using Coplanar Parallel Lines

X- Chart Using ANOM Approach

Corner-Based Image Alignment using Pyramid Structure with Gradient Vector Similarity

LOOP ANALYSIS. The second systematic technique to determine all currents and voltages in a circuit

An efficient method to build panoramic image mosaics

ROBOT KINEMATICS. ME Robotics ME Robotics

Polyhedral Compilation Foundations

Transcription:

3D vector computer graphcs Paolo Varagnolo: freelance engneer Padova Aprl 2016 Prvate Practce ----------------------------------- 1. Introducton Vector 3D model representaton n computer graphcs requres some smple maths transformatons to adapt model dmensons to the graphcs object where the model wll be drawn. In the followng a vb.net envronment s consdered, and therefore a graphcs object s an object that can contan graphc enttes such as a form or a panel control 1. In fgure 1-a) the typcal coordnate system for a computer devce s shown, whle the coordnate system for a generc model s shown n fgure 1-b). The dmensons of the graphcal wndow are usually measured n pxels and are ndcated as Graphc.Wdth and Graphc.Heght. The dmensons of the model s any, and t naturally can be n any locaton wth respect of the model coordnate system. The thrd dmenson wll be treated further on, after dealng wth the man mathematcal transformatons. It s useful to hghlght that f a prnter object s consdered nstead of a graphcs object, nothng changes. Fgure 1-a) Fgure 1-b) 1 To obtan the best graphcal management ths object needs to recognze the mouse wheel event. 1

2. Man mathematcal transformatons 2.1 Zoom extents Ths s the man task of the model representaton. The model s drawn wth the maxmum possble sze n the graphc wndow, as shown n fgure 2. The axes are named Xd, Yd meanng x, y coordnates of the drawng. Fgure 2 Ths requres a scale transformaton to fll the graphc area, a shft transformaton to move the model center (Xmc, Ymc) to the graphc center (Xgc, Ygc), and fnally a mrror transformaton to accomplsh wth the opposte orentaton of the y axs. All the three above operatons can be wrtten as: where: Xmc - x Xdraw = Xgc - ; GrRato - x, y are the coordnates of a pont to be drawn Ymc - y Ydraw Ygc + GrRato - Xgc, Ygc are the coordnates of the graphc center, as shown n fgures 1-a) - Xmc, Ymc are the coordnates of the model center, as shown n fgures 1-b) = (1) - Xdraw, Ydraw are the drawng coordnates of the model, transformed from ther orgnal reference system to the drawng wndow reference system X max X mn GraphcWdth. Y max Y mn Graphc. Heght - GrRato = max(, ) s the rato of the model sze to the graphc wndow 2

2.2 Zoom wndow The second man task of the model representaton s to draw a zoom of the model contaned n a selecton rectangle, as shown n fgure 3-a). The result of ths s represented n fgure 3-b). Fgure 3-a) Fgure 3-b) To obtan ths, two smple operatons are needed: a check for the lnes contaned n the zoom rectangle, and a zoom extents operaton as descrbed n the prevous paragraph. The check of the lnes contaned n the zoom rectangle wll calculate new Xmn, Xmax,Ymn and Ymax coordnates to ntroduce n equatons (1). 3

2.3 Pannng In addton to the man operatons descrbed above, t could be useful to menton the pan transformaton that means a repostonng of the vew n the drawng area. It can be accomplshed smply by changng the Xgc, Ygc coordnates of the graphc wndow. For example the pan represented n fgure 4, from the lower-left poston to the hgher-rght poston, s obtaned wth the followng transformaton: Xgc =Xgc + x; Ygc =Ygc - y where x and y are postve values n ths case. The drawng coordnates are always obtaned usng equatons (1). Fgure 4 4

2.4 Zoom wth the mouse wheel The use of the mouse wheel n computer graphcs s usually assocated to the operatons of zoom and pan at the same tme. In the followng fgure 5 a postve zoom (magnfcaton) s represented, together wth a shft of the model from the orgnal poston to another. For an outward rotaton of the mouse wheel, wth reference to fgure 5, the equatons that descrbe the transformaton are: Xcg = Xcg wp x; Ycg = Ycg wp y turn away the model GrRato = GrRato / wp magnfes the model where: - wp s the wheel power, a postve constant that medates the effect of the wheel rotaton. The value could be 0.02 or 0.03 for a power of 20% or 30%. - x, xy are the dstances from the mouse poston and the graphc center (both negatve n the case of fgure 5) Fgure 5 For a nward rotaton of the mouse wheel, that could reverse the transformaton shown n fgure 5, the equatons are: Xcg = Xcg + wp x; Ycg = Ycg + wp y brng near the model GrRato = GrRato wp reduces the model 5

3. 3D representaton There are many artcles avalable on the subject, nonetheless I beleve that a smple descrpton, along wth some practcal examples, could be useful. The only representaton consdered n ths artcle s the axonometrc orthographc projecton of a 3D model on a 2D plane. In ths knd of transformaton the real model s projected on a plane by means of parallel rays sent out from a pont of vew. Perspectve effects are neglected and dmensons are not altered; parallelsm of lnes are preserved but angles are not preserved. It s the way engneerng calculaton programs act. Fgure 6 Fgure 6 shows a parallelepped projected from on three pont of vew: - wth the pont of vew parallel to x axs the result s a projecton on a plane parallel to (y, z) plane; - wth the pont of vew parallel to y axs the result s a projecton on a plane parallel to (z, x) plane; - wth the pont of vew parallel to z axs the result s a projecton on a plane parallel to (x, y) plane. Fgure 7 shows a projecton obtaned from a generc pont of vew. The pont of vew s defned by means of two angles: the frst angle, named α, defnes the poston of the projecton of the pont of vew on the (x, y) plane; the second angle, named β, defnes the elevaton of the pont of vew wth respect to the (x, y) plane. Wth these assumptons, the coordnates (x, y, z ) of a generc pont n a 3D space are projected on a plane n the pont (xp, yp, zp ) wth the followng equatons: xp = x senα + y cosα yp = ( x cosα y senα) senβ + z cosβ Fgures 8, 9 and 10 show some examples of the projecton of a cube from three dfferent ponts of vew. It s nterestng to notce how the global coordnate system appears from the varous ponts of vew. Fgure 7 6

Fgure 8 Fgure 9 Fgure 10 7