Free Essay

The Cohen-Sutherland Algorithm

In:

Submitted By wheezy2994
Words 367
Pages 2
The Cohen-Sutherland Algorithm
In this algorithm we divide the line clipping process into two phases: (1) identify those lines which intersect the clipping window and so need to be clipped and (2) perform the clipping.
All lines fall into one of the following clipping categories:

1. Visible---both endpoints of the line lie within the window.
2. Not visible---the line definitely lies outside the window. This will occur if the line from (x1, y1) to (x2, y2) satisfies anyone of the following four inequalities: x1, x2 >xmax y1, y2 >ymax x1, x2 <xmin y1, y2 <ymin
3. Clipping candidate--- the line is in neither category 1 nor 2.

Midpoint Subdivision
An alternative way to process a line in category 3 is based on binary search. The line is divided at its midpoint into two shorter line segments. The clipping categories of the two new line segments are then determined by their region codes. Each segment in category 3 is divided again into shorter segment and categorized. This bisection and categorization process continues until each line segment that spans across a window boundary (hence encompasses an intersection point) reaches a threshold for line size and all other segements are either in category 1 (visible) or in category 2 (invisible). The midpoint coordinates (xm , ym) of a line joining (x1 , y1) and (x2, y2) are given by xm=x1+x22 ym=y1+y22

The Liang-Barsky algorithm for finding the visible portion of the line, if any, can be stated as a four-step process:
1. If pk = 0 and qk < 0 for any k, eliminate the line and stop. Otherwise proceed to the next step.
2. For all k such that pk < 0, calculate rk = qk /pk. Let u1 be the maximum of the set containing 0 and the calculated r values.
3. For all k such that pk > 0, calculate rk = qk/pk. Let u2 be the minimum of the set containing 1 and the calculated r values.
4. If u1>u2, eliminate the line since it is completely outside the clipping window. Otherwise, use u1 and u2 to calculate the endpoints of the clipped line.

Similar Documents

Premium Essay

It and Its Scope

...UNIVERSITY OF MUMBAI Bachelor of Engineering Information Technology (Third Year – Sem. V & VI) Revised course (REV- 2012) from Academic Year 2014 -15 Under FACULTY OF TECHNOLOGY (As per Semester Based Credit and Grading System) University of Mumbai, Information Technology (semester V and VI) (Rev-2012) Page 1 Preamble To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this Faculty of Technology of University of Mumbai has taken a lead in incorporating philosophy of outcome based education in the process of curriculum development. Faculty of Technology, University of Mumbai, in one of its meeting unanimously resolved that, each Board of Studies shall prepare some Program Educational Objectives (PEO‟s) and give freedom to affiliated Institutes to add few (PEO‟s) and course objectives and course outcomes to be clearly defined for each course, so that all faculty members in affiliated institutes understand the depth and approach of course to be taught, which will enhance learner‟s learning process. It was also resolved that, maximum senior faculty from colleges and experts from industry to be involved while revising the curriculum. I am happy to state...

Words: 10444 - Pages: 42

Free Essay

Mobile Ad Hoc Network Comlete Seminar Report File

...MC1704 Computer Graphics and Multimedia System 2 Marks Questions 1. What is scan conversion? A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel-intensity values for storage in the frame buffer. This digitization process is called scan conversion. 2. Write the properties of video display devices? Properties of video display devices are persistence, resolution, and aspect ratio. 3. What is rasterization? The process of determining the appropriate pixels for representing picture or graphics object is known as rasterization. 4. Define Computer graphics. Computer graphics remains one of the most existing and rapidly growing computer fields. Computer graphics may be defined as a pictorial representation or graphical representation of objects in a computer. 5. Name any four input devices. Four input devices are keyboard, mouse, image scanners, and trackball. 6. Write the two techniques for producing color displays with a CRT? Beam penetration method, shadow mask method 7. What is vertical retrace of the electron beam? In raster scan display, at the end of one frame, the electron beam returns to the left top corner of the screen to start the next frame, is called vertical retrace of the electron beam. 8. Short notes on video controller? Video controller is used to control the operation of the display device. A fixed area of the system is reserved for the frame buffer, and the video controller...

Words: 8037 - Pages: 33

Free Essay

Syllabus

...SCHEME OF EXAMINATION FOR MASTER OF COMPUTER APPLICATIONS (MCA) (SIX-SEMESTER Programme) |Semester – I | |Paper |Title of the Paper |Duration |Maximum Marks |Total | |No. | |Of Exam | | | | | | |Theory |Sessional* | | |MCA-101 |Computer Fundamentals and Problem Solving Using C |3 Hours |80 |20 |100 | |MCA-102 |Computer Organisation |3 Hours |80 |20 |100 | |MCA-103 |Discrete Mathematical Structures |3 Hours |80 |20 |100 | |MCA-104 |Software Engineering |3 Hours |80 |20 |100 | |MCA-105 |Computer Oriented Numerical and Statistical Methods |3 Hours |80 |20 |100 | |MCA-106 |Software Laboratory - I |3 Hours | | |100 | | |C (Based on MCA-101) |...

Words: 13848 - Pages: 56

Free Essay

Accounting

...Click here to download the solutions manual / test bank INSTANTLY!! http://testbanksolutionsmanual.blogspot.com/2011/02/accounting-information-systems-romney.html ------------------------------------------------------------------------------------------------------------------------ Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney Steinbart 11th Edition Solutions Manual Accounting Information Systems Romney Steinbart 11th Edition Solutions Manual ------------------------------------------------------------------------------------------------------------------------ ***THIS IS NOT THE ACTUAL BOOK. YOU ARE BUYING the Solution Manual in e-version of the following book*** Name: Accounting Information Systems Author: Romney Steinbart Edition: 11th ISBN-10: 0136015182 Type: Solutions Manual - The file contains solutions and questions to all chapters and all questions. All the files are carefully checked and accuracy is ensured. - The file is either in .doc, .pdf, excel, or zipped in the package and can easily be read on PCs and Macs.  - Delivery is INSTANT. You can download the files IMMEDIATELY once payment is done. If you have any questions, please feel free to contact us. Our response is the fastest. All questions will always be answered in 6...

Words: 18533 - Pages: 75

Free Essay

Maglev

...*3963103* [3963] – 103 T.E. (Petroleum) (Semester – I) Examination, 2011 DRILLING & PRODUCTION OPERATIONS (2003 Course) Time : 3 Hours Max. Marks : 100 Instructions : 1) Question Nos. 1 and 5 are compulsory. Out of the remaining attempt 2 questions from Section I and 2 questions from Section II. 2) Answers to the two Sections should be written in separate books. 3) Neat diagrams must be drawn wherever necessary. 4) Black figures to the right indicate full marks. 5) Use of Logarithmic Tables, Slide Rule, Mollier Charts, Electronic Pocket Calculator and Steam Tables is allowed. 6) Assume suitable data, if necessary. SECTION – I 1. What are different systems on a drilling rig ? Explain any one in detail with suitable diagramme. 18 2. a) Calculate Bottom hole pressure if well depth is 2500 m and mud weight is 1.2 gm/cc. b) Calculate mud weight if mud gradient is 0.87 psi/ft. ′ c) Calculate volume bbl/meter for drill pipe O.D. = 5′ inch and I.D. = 4.276 inch. 2 2 2 10 8 8 16 d) Draw circulation system on a drilling rig. 3. a) Discuss IADC classification of a bit in details. b) Discuss different factors affecting rate of penetration in details. 4. Write short note on : i) Coring ii) Fishing tools iii) BOP iv) Directional well P.T.O. [3963] – 103 -2- *3963103* SECTION – II 5. a) Discuss different types of casings and function of the casings in brief. b) Discuss different types of well completion techniques. 6. a) Discuss primary cementation process with...

Words: 172166 - Pages: 689

Free Essay

Studengnt Motivation

...Adult Media Literacy A review of the research literature on behalf of Ofcom By Sonia Livingstone Elizabeth Van Couvering Nancy Thumim Department of Media and Communications London School of Economics and Political Science Houghton Street London WC2A 2AE Tel: +44 (0) 20 7955 7710 Fax:+44 (0) 20 7955 7248 E-mail: s.livingstone@lse.ac.uk Ofcom Adult media literacy Preface Ofcom is the independent regulator for the UK communications industry. As part of Ofcom’s work to promote media literacy we plan to undertake or support a range of research activities to monitor people’s skills, knowledge and understanding of communications technologies and the content they watch and listen to either through broadcasting or online. Ofcom defines media literacy as the ability to access, understand and create communications in a variety of contexts. We have published our strategy and priorities for the promotion of media literacy and these can be found on our website. In October 2004 we commissioned Professor David Buckingham and Professor Sonia Livingstone to report on recent relevant academic and other publicly-available research into children’s and adults’ media literacy respectively. The purpose of this work was to outline the range of studies conducted, the gaps in research, provide examples of innovative methodologies, and outline possible barriers and enablers to media literacy identified by these studies. These reviews have admirably fulfilled their task, and provide a...

Words: 38353 - Pages: 154

Free Essay

Phsychology

...Educational Psychology: Developing Learners This is a protected document. Please enter your ANGEL username and password. Username: Password: Login Need assistance logging in? Click here! If you experience any technical difficulty or have any technical questions, please contact technical support during the following hours: M-F, 6am-12am MST or Sat-Sun, 7am-12am MST by phone at (800) 800-9776 ext. 7200 or submit a ticket online by visiting http://help.gcu.edu. Doc ID: 1009-0001-191D-0000191E DEVELOPING LEARNERS JEANNE ELLIS ORMROD Professor Emerita, University of Northern Colorado EIGHTH EDITION ISBN 1-256-96292-9 Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City São Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Educational Psychology: Developing Learners, Eighth Edition, by Jeanne Ellis Ormrod. Published by Pearson. Copyright © 2014 by Pearson Education, Inc. Vice President and Editorial Director: Jeffery W.  Johnston Vice President and Publisher: Kevin Davis Editorial Assistant: Lauren Carlson Development Editor: Christina Robb Vice President, Director of Marketing: Margaret Waples Marketing Manager: Joanna Sabella Senior Managing Editor: Pamela D. Bennett Project Manager: Kerry Rubadue Senior Operations Supervisor: Matthew Ottenweller Senior Art Director: Diane Lorenzo Text Designer: Candace Rowley Cover Designer:...

Words: 244561 - Pages: 979

Premium Essay

Myths

...Contents Preface Acknowledgments Introduction 1 BRAIN POWER Myth #1 Most People Use Only 10% of Their Brain Power Myth #2 Some People Are Left-Brained, Others Are Right-Brained Myth #3 Extrasensory Perception (ESP) Is a Well-Established Scientific Phenomenon Myth #4 Visual Perceptions Are Accompanied by Tiny Emissions from the Eyes Myth #5 Subliminal Messages Can Persuade People to Purchase Products 2 FROM WOMB TO TOMB Myth #6 Playing Mozart’s Music to Infants Boosts Their Intelligence Myth #7 Adolescence Is Inevitably a Time of Psychological Turmoil Myth #8 Most People Experience a Midlife Crisis in | 8 Their 40s or Early 50s Myth #9 Old Age Is Typically Associated with Increased Dissatisfaction and Senility Myth #10 When Dying, People Pass through a Universal Series of Psychological Stages 3 A REMEMBRANCE OF THINGS PAST Myth #11 Human Memory Works like a Tape Recorder or Video Camera, and Accurate Events We’ve Experienced Myth #12 Hypnosis Is Useful for Retrieving Memories of Forgotten Events Myth #13 Individuals Commonly Repress the Memories of Traumatic Experiences Myth #14 Most People with Amnesia Forget All Details of Their Earlier Lives 4 TEACHING OLD DOGS NEW TRICKS Myth #15 Intelligence (IQ) Tests Are Biased against Certain Groups of People My th #16 If You’re Unsure of Your Answer When Taking a Test, It’s Best to Stick with Your Initial Hunch Myth #17 The Defining Feature of Dyslexia Is Reversing Letters Myth #18 Students Learn Best When Teaching Styles Are Matched to...

Words: 130018 - Pages: 521

Premium Essay

Business Performance Measurement

...This page intentionally left blank Business Performance Measurement Drawing together contributions from leading thinkers around the world, this book reviews recent developments in the theory and practice of performance measurement and management. Significantly updated and modified from the first edition, the book includes ten new chapters that provide a comprehensive review of performance measurement from the perspectives of accounting, marketing, operations, public services and supply chain management. In addition to these functional analyses the book explores performance measurement frameworks and methodologies, practicalities and challenges, and enduring questions and issues. Edited by one of the world’s leading experts on performance measurement and management, Business Performance Measurement will be of interest to graduate students, managers and researchers who wish to understand more about the latest developments in this rapidly changing field. Andy Neely is Deputy Director of the ESRC/EPSRC AIM Research initiative, Professor of Operations Strategy and Performance at Cranfield School of Management, and Visiting Professor of Operations Management at London Business School. Business Performance Measurement Unifying theories and integrating practice Second edition Edited by Andy Neely CAMBRIDGE UNIVERSITY PRESS Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo Cambridge University Press The Edinburgh Building, Cambridge...

Words: 191452 - Pages: 766

Free Essay

Book

...THE PLAYER Good game design is player-centric. That means that above all else, the player and her desires are truly considered. Rather than demanding that she do something via the rules, the gameplay itself should inherently motivate the player in the direction the designer wants her to go. Telling players they must travel around the board or advance to the next level is one thing. If they don’t have a reason and a desire to do it, then it becomes torture. In creating a game, designers take a step back and think from the player’s viewpoint: What’s this game about? How do I play? How do I win? Why do I want to play? What things do I need to do? MEANINGFUL DECISIONS Distilled down to its essence, game design is about creating opportunities for players to make meaningful decisions that affect the outcome of the game. Consider a game like a boxing match. So many decisions lead up to the ultimate victory. How long will I train? Will I block or will I swing? What is my opponent going to do? Where is his weakness? Jab left or right? Even those few, brief questions don’t come close to the myriad decisions a fighter must make as he progresses through a match. Games invite players into similar mental spaces. Games like Tetris and Chess keep our minds busy by forcing us to consider which one of several possible moves we want to take next. In taking these paths, we know that we may be prolonging or completely screwing up our entire game. The Sims games and those in...

Words: 111961 - Pages: 448

Premium Essay

E-Book Supply Chain Management

...Introduction to Supply Chain Management Technologies Second Edition Introduction to Supply Chain Management Technologies Second Edition David Frederick Ross CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2011 by Taylor and Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed in the United States of America on acid-free paper 10 9 8 7 6 5 4 3 2 1 International Standard Book Number-13: 978-1-4398-3753-5 (Ebook-PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval...

Words: 158845 - Pages: 636

Premium Essay

A Guide to Forensic Accounting Investigation

...A GUIDE TO FORENSIC ACCOUNTING INVESTIGATION THOMAS W. GOLDEN, STEVEN L. SKALAK, AND MONA M. CLAYTON JOHN WILEY & SONS, INC. A GUIDE TO FORENSIC ACCOUNTING INVESTIGATION THOMAS W. GOLDEN, STEVEN L. SKALAK, AND MONA M. CLAYTON JOHN WILEY & SONS, INC. This book is printed on acid-free paper. Copyright © 2006 by PricewaterhouseCoopers LLP. PricewaterhouseCoopers refers to the individual member firms of the worldwide PricewaterhouseCoopers organization. All rights reserved. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400, fax 978-646-8600, or on the Web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, 201-748-6011, fax 201-748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this...

Words: 246885 - Pages: 988

Free Essay

Test2

...62118 0/nm 1/n1 2/nm 3/nm 4/nm 5/nm 6/nm 7/nm 8/nm 9/nm 1990s 0th/pt 1st/p 1th/tc 2nd/p 2th/tc 3rd/p 3th/tc 4th/pt 5th/pt 6th/pt 7th/pt 8th/pt 9th/pt 0s/pt a A AA AAA Aachen/M aardvark/SM Aaren/M Aarhus/M Aarika/M Aaron/M AB aback abacus/SM abaft Abagael/M Abagail/M abalone/SM abandoner/M abandon/LGDRS abandonment/SM abase/LGDSR abasement/S abaser/M abashed/UY abashment/MS abash/SDLG abate/DSRLG abated/U abatement/MS abater/M abattoir/SM Abba/M Abbe/M abbé/S abbess/SM Abbey/M abbey/MS Abbie/M Abbi/M Abbot/M abbot/MS Abbott/M abbr abbrev abbreviated/UA abbreviates/A abbreviate/XDSNG abbreviating/A abbreviation/M Abbye/M Abby/M ABC/M Abdel/M abdicate/NGDSX abdication/M abdomen/SM abdominal/YS abduct/DGS abduction/SM abductor/SM Abdul/M ab/DY abeam Abelard/M Abel/M Abelson/M Abe/M Aberdeen/M Abernathy/M aberrant/YS aberrational aberration/SM abet/S abetted abetting abettor/SM Abeu/M abeyance/MS abeyant Abey/M abhorred abhorrence/MS abhorrent/Y abhorrer/M abhorring abhor/S abidance/MS abide/JGSR abider/M abiding/Y Abidjan/M Abie/M Abigael/M Abigail/M Abigale/M Abilene/M ability/IMES abjection/MS abjectness/SM abject/SGPDY abjuration/SM abjuratory abjurer/M abjure/ZGSRD ablate/VGNSDX ablation/M ablative/SY ablaze abler/E ables/E ablest able/U abloom ablution/MS Ab/M ABM/S abnegate/NGSDX abnegation/M Abner/M abnormality/SM abnormal/SY aboard ...

Words: 113589 - Pages: 455