SlideShare a Scribd company logo
1 of 23
WINDOW AND CLIPPING
PREPARED BY:-
BHAVESH PANCHAL
•INTRODUCTION
•WINDOW AND VIEWPORT
•WINDOW TO VIEWPORT TRANSFORMATION
•CLIPPING
•SUTHERLAND-COHEN CLIPPING ALGORITHM
INDEX
INTRODUCTION
 There are two types of coordinate system mainly-
1. World coordinate system
2. Screen coordinate system
1. WORLD COORDINATE SYSTEM
The CAD Software stores graphical information
in the model database with respect to
coordinate system, called WCS or Model
Coordinate System
 This is the only coordinate system that software
recognizes when storing or retrieving graphical
information from model database.
2) SCREEN COORDINATE SYSTEM
 It is the coordinate system which is used to display
screen.
 User input the graphical information with respect to this
coordinate system.
 It is also known as Working Coordinate System or User
Coordinate System.
COORDINATE SYSTEMS
y
x0
(x, y)
World Coordinates:
• User-Defined Limits
• Floating point values
(u,v)
u
v
0
Device Coordinates:
• Device dependent Limits
• Positive Integer values
WINDOW AND VIEWPORT
 When geometric model is complex and crowded with
intrinsic details, it is difficult to read it. In such
situation, it is convenient to display only certain
portion of geometric model which is of interest of
used at that time.
 Here comes, effect of WINDOW and VIEWPORT.
Window
Image Space
Viewport
Information outside
the viewport is
clipped away
 WINDOW
 It is the portion of geometric model which is selected
for viewing. This technique of selecting portion is called
Windowing.
 Generally, window is rectangular in shape with edges
parallel to axes of world coordinate system
 It is the finite portion in World Coordinate System.
 VIEWPORT
 Viewport is the part of screen on which window is displayed.
 Viewport is also rectangular in shape with its edges parallel to axes
of User coordinate system.
 Content of Viewport can be edited in viewport.
 By selecting number of windows on geometric model, multiple
viewport can be placed on screen.
WINDOW AND VIEWPORT
minxw maxxw
minyw
maxyw
Clipping Window
minxv maxxv
minyv
maxyv
Viewport
WINDOW TO VIEWPORT TRANSFORMATION
 The mapping of geometric model from world
coordinate system to user coordinate system is
referred as Window to
Viewport transformation or Viewing
transformation.
 Transformation is implemented in such a manner
that relative position of all points on object is not
affected.
 Viewing transformation can be achieved with the
help of Scaling and Translation.
Choose Window in
World Coordinates
Clip to size
of Window
Translate to
origin
Scale to size of Viewport Translate to proper position in image
CLIPPING
 On Viewport only those entities are supposed to be
visible which are inside the windows in WCS.
 If a line is drawn outside the boundaries of window
then it will not be visible in viewport of screen
coordinate system.
 Portion which lies outside the boundary of window is
clipped and only the part which lies inside the
boundary of window is visible in viewport.
CLIPPING ALGORITHM
1. Identify invisible lines which are completely
outside the boundaries of window.
2. Identify visible lines which lies completely inside
the boundaries of window.
3. The lines which are partially inside and partially
outside the window, only for such lines we find
intersection point of that line with edges of
boundary of window.
4 BIT CODE METHOD
ALGORITHM FOR CLIPPING LINE
SEGMENT
1. Find 4-bit code for point P1 AND P2.
2. Check whether condition 1 is satisfied or not. If
it is satisfied then, line is visible.
3. If condition 2 is satisfied then line is visible.
4. If both condition 1 and condition 2 are not
satisfied then line is partially visible an partially
invisible. In that case, we find intersection point
of line with edges of window.
SUTHERLAND-COHEN CLIPPING
ALGORITHM
 It is the oldest and most popular line clipping method.
 Generally, this method speeds up the processing of line
segment by performing initial test and reduce number of
intersection that must be calculated.
 Here, clipping algorithm is performed with respect to all
edges of window.
STEPS OF ALGORITHM
1. Check for completely visible and invisible lines.
Example, if both the endpoints of line are on correct side of
edge then, line is said to be visible while if both the end
points of line segment lies on wrong side of window edge
then it is considered as invisible line.
2. Keep point P1 on correct side of edge always for simplicity
of algorithm. If P1 lies on wrong side of edge then swap P1
and P2.
3. Find the intersection point (P1,P2) with the edges of
window. Denote the intersection point with I.
Clip (P2,I). So that line segment remain is (P1, I).
4. Take line segment (P1, I) for further clipping process.
5. Repeat the whole clipping process with respect to all
different edges of window to get visible line.
FORMULA FOR CALCULATING
INTERSECTION POINT
THANK
YOU

More Related Content

What's hot

The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmMani Kanth
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clippingMani Kanth
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingAnkit Garg
 
Clipping in 2 d
Clipping in 2 dClipping in 2 d
Clipping in 2 dAshiv Khan
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmMaruf Abdullah (Rion)
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics Barani Tharan
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsRohit Jain
 
Computer Graphic - Clipping
Computer Graphic - ClippingComputer Graphic - Clipping
Computer Graphic - Clipping2013901097
 
Comparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementComparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementIJMER
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithmMohamed El-Serngawy
 
Cohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marksCohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marksRehan Khan
 

What's hot (20)

2D viewing
2D viewing2D viewing
2D viewing
 
Clipping
ClippingClipping
Clipping
 
Clipping2
Clipping2Clipping2
Clipping2
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clipping
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Clipping in 2 d
Clipping in 2 dClipping in 2 d
Clipping in 2 d
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
 
Computer Graphic - Clipping
Computer Graphic - ClippingComputer Graphic - Clipping
Computer Graphic - Clipping
 
06 clipping
06 clipping06 clipping
06 clipping
 
Comparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for ImprovementComparison of Various Line Clipping Algorithm for Improvement
Comparison of Various Line Clipping Algorithm for Improvement
 
Line clipping
Line clippingLine clipping
Line clipping
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Clipping
ClippingClipping
Clipping
 
Cohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marksCohen and Sutherland Algorithm for 7-8 marks
Cohen and Sutherland Algorithm for 7-8 marks
 

Similar to Transforming 3D Models and Clipping Lines

Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfAmol Gaikwad
 
Clipping CG ppt.pptx
Clipping CG ppt.pptxClipping CG ppt.pptx
Clipping CG ppt.pptxAamirSheikh49
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clippingShweta Shah
 
UNIT_3-Two-Dimensional-Geometric-Transformations.pdf
UNIT_3-Two-Dimensional-Geometric-Transformations.pdfUNIT_3-Two-Dimensional-Geometric-Transformations.pdf
UNIT_3-Two-Dimensional-Geometric-Transformations.pdfVivekKumar148171
 
Unit 3
Unit 3Unit 3
Unit 3ypnrao
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notesKushKumar293234
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphicsKALESHWAR KUMAR
 
Group 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxKelvinDube4
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptxKelvinDube4
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptxKelvinDube4
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptGaganvirKaur
 
CIM INTRODUCTION UNIT 1.pdf
CIM INTRODUCTION UNIT 1.pdfCIM INTRODUCTION UNIT 1.pdf
CIM INTRODUCTION UNIT 1.pdfLogeshBabu18
 

Similar to Transforming 3D Models and Clipping Lines (20)

Clipping
ClippingClipping
Clipping
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
CAD
CAD CAD
CAD
 
Clipping CG ppt.pptx
Clipping CG ppt.pptxClipping CG ppt.pptx
Clipping CG ppt.pptx
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
UNIT_3-Two-Dimensional-Geometric-Transformations.pdf
UNIT_3-Two-Dimensional-Geometric-Transformations.pdfUNIT_3-Two-Dimensional-Geometric-Transformations.pdf
UNIT_3-Two-Dimensional-Geometric-Transformations.pdf
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
 
ch4.pptx
ch4.pptxch4.pptx
ch4.pptx
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notes
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
Group 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptx
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptx
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptx
 
Clipping
ClippingClipping
Clipping
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.ppt
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
UNIT-III
UNIT-IIIUNIT-III
UNIT-III
 
Clipping
ClippingClipping
Clipping
 
CIM INTRODUCTION UNIT 1.pdf
CIM INTRODUCTION UNIT 1.pdfCIM INTRODUCTION UNIT 1.pdf
CIM INTRODUCTION UNIT 1.pdf
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 

Transforming 3D Models and Clipping Lines

  • 1. WINDOW AND CLIPPING PREPARED BY:- BHAVESH PANCHAL
  • 2. •INTRODUCTION •WINDOW AND VIEWPORT •WINDOW TO VIEWPORT TRANSFORMATION •CLIPPING •SUTHERLAND-COHEN CLIPPING ALGORITHM INDEX
  • 3. INTRODUCTION  There are two types of coordinate system mainly- 1. World coordinate system 2. Screen coordinate system 1. WORLD COORDINATE SYSTEM The CAD Software stores graphical information in the model database with respect to coordinate system, called WCS or Model Coordinate System
  • 4.  This is the only coordinate system that software recognizes when storing or retrieving graphical information from model database. 2) SCREEN COORDINATE SYSTEM  It is the coordinate system which is used to display screen.  User input the graphical information with respect to this coordinate system.  It is also known as Working Coordinate System or User Coordinate System.
  • 5. COORDINATE SYSTEMS y x0 (x, y) World Coordinates: • User-Defined Limits • Floating point values (u,v) u v 0 Device Coordinates: • Device dependent Limits • Positive Integer values
  • 6. WINDOW AND VIEWPORT  When geometric model is complex and crowded with intrinsic details, it is difficult to read it. In such situation, it is convenient to display only certain portion of geometric model which is of interest of used at that time.  Here comes, effect of WINDOW and VIEWPORT.
  • 8.  WINDOW  It is the portion of geometric model which is selected for viewing. This technique of selecting portion is called Windowing.  Generally, window is rectangular in shape with edges parallel to axes of world coordinate system  It is the finite portion in World Coordinate System.
  • 9.  VIEWPORT  Viewport is the part of screen on which window is displayed.  Viewport is also rectangular in shape with its edges parallel to axes of User coordinate system.  Content of Viewport can be edited in viewport.  By selecting number of windows on geometric model, multiple viewport can be placed on screen.
  • 10. WINDOW AND VIEWPORT minxw maxxw minyw maxyw Clipping Window minxv maxxv minyv maxyv Viewport
  • 11. WINDOW TO VIEWPORT TRANSFORMATION  The mapping of geometric model from world coordinate system to user coordinate system is referred as Window to Viewport transformation or Viewing transformation.  Transformation is implemented in such a manner that relative position of all points on object is not affected.  Viewing transformation can be achieved with the help of Scaling and Translation.
  • 12. Choose Window in World Coordinates Clip to size of Window Translate to origin Scale to size of Viewport Translate to proper position in image
  • 13. CLIPPING  On Viewport only those entities are supposed to be visible which are inside the windows in WCS.  If a line is drawn outside the boundaries of window then it will not be visible in viewport of screen coordinate system.  Portion which lies outside the boundary of window is clipped and only the part which lies inside the boundary of window is visible in viewport.
  • 14.
  • 15. CLIPPING ALGORITHM 1. Identify invisible lines which are completely outside the boundaries of window. 2. Identify visible lines which lies completely inside the boundaries of window. 3. The lines which are partially inside and partially outside the window, only for such lines we find intersection point of that line with edges of boundary of window.
  • 16. 4 BIT CODE METHOD
  • 17. ALGORITHM FOR CLIPPING LINE SEGMENT 1. Find 4-bit code for point P1 AND P2. 2. Check whether condition 1 is satisfied or not. If it is satisfied then, line is visible. 3. If condition 2 is satisfied then line is visible. 4. If both condition 1 and condition 2 are not satisfied then line is partially visible an partially invisible. In that case, we find intersection point of line with edges of window.
  • 18. SUTHERLAND-COHEN CLIPPING ALGORITHM  It is the oldest and most popular line clipping method.  Generally, this method speeds up the processing of line segment by performing initial test and reduce number of intersection that must be calculated.  Here, clipping algorithm is performed with respect to all edges of window.
  • 19. STEPS OF ALGORITHM 1. Check for completely visible and invisible lines. Example, if both the endpoints of line are on correct side of edge then, line is said to be visible while if both the end points of line segment lies on wrong side of window edge then it is considered as invisible line. 2. Keep point P1 on correct side of edge always for simplicity of algorithm. If P1 lies on wrong side of edge then swap P1 and P2.
  • 20.
  • 21. 3. Find the intersection point (P1,P2) with the edges of window. Denote the intersection point with I. Clip (P2,I). So that line segment remain is (P1, I). 4. Take line segment (P1, I) for further clipping process. 5. Repeat the whole clipping process with respect to all different edges of window to get visible line.