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

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
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
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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)
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
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
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
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
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
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...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 

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.