SlideShare a Scribd company logo
Prof. Neeraj Bhargava
Pooja Dixit
Department of Computer Science
School of Engineering & System Sciences
MDS, University Ajmer, Rajasthan, India
1
 Clipping Basics
 Cohen-Sutherland Line Clipping
 Clipping Polygons
 Sutherland-Hodgman Clipping
 Perspective Clipping
2
3
 Clipping is a process that identifies those portions of a picture that
are either inside or outside of a specified region or space is known as
clipping.
 Clip regions are commonly specified to improve render performance.
A well-chosen clip allows the renderer to save time and energy by
skipping clculations related to pixels that the user cannot seeworld
coordinates
Windowing I
A scene is made up of a collection of
objects specified in world coordinates
View coordinates
Windowing II
When we display a scene only those
objects within a particular window are
displayed.
world coordinates world coordinates
WYmin
WYmax
WYmin
WYmax
WXmin WXmax WXmin WXmax
Windowing III
Because drawing things to a
display takes time we clip
everything outside the window
4
 Consider an example in figure that shows
which lines and points should be kept and
which ones should be clipped.
 What is Point Clipping?
 Point clipping helps in identifying whether a particular point (X, Y) is
within the window and accordingly take appropriate actions for using the
coordinates of the window, either maximum or minimum.
 If x satisfies that Wx1 ≤ X ≤ Wx2, then the coordinate X is inside the
window, and if Y satisfies that Wy1 ≤ Y ≤ Wy2, then Y lies inside the
window.
5
 What is Line Clipping?
 The part of the line inside the window is kept and the part of
the line appearing outside is removed in Line Clipping.
 Cohen-Sutherland Line Clippings
 The clip window depicted below is used by this algorithm.
6
 The entire region is divided by using 4-bits which represent
Top, Bottom, Right, and Left of the region, As it is the TOP-
LEFT corner, the TOP and LEFT bit is set to 1.
7
 For the line, there are three different possibilities:
 Line can be completely inside the window (This line should be
accepted).
 Line can be completely outside of the window (This line will
be completely removed from the region).
 Line can be partially inside the window (We will find
intersection point and draw only that portion of line that is
inside region).
8
 Algorithm
Step 1 – For each endpoints, a region code is assigned.
Step 2 – The line is accepted if both endpoints have a region
code 0000.
Step 3 − Else, the logical AND operation is performed for
both region codes.
Step 3.1 − If the result is not 0000, then reject the line.
Step 3.2 − Else clipping is required.
Step 3.2.1 − An endpoint of the line is selected that is
outside the window.
Step 3.2.2 − Find the intersection point at the window
boundary (base on region code).
Step 3.2.3 – The endpoint is replaced with the intersection
point and the region code is updated.
Step 3.2.4 − Repeat step 2 until we find a clipped line either
trivially accepted or trivially rejected.
Step 4 − Repeat step 1 for other lines.
9
 What is Polygon Clipping (Sutherland Hodgman Algorithm)?
 Against the edges of the clipping window, the vertices of the
polygon are clipped by using Sutherland Hodman Algorithm.
 New vertices of the polygon are obtained by clipping the left
edge of the polygon window. The polygon is clipped against
right edge by using the new vertices as depicted below.
10
 If the edge is not completely inside the clipping window, an intersection
point appears. The portion that is outside is clipped as depicted below:
11
 What is Text Clipping?
 Text clipping can be provided in computer graphics by using
different techniques. The characters are generated and the
requirements of a particular application. Text clipping can be done
in three different methods:
 All or none string clipping
 All or none character clipping
 Text clipping
 All or none string clipping is depicted below:
12
 Under this method, either the entire string is kept or the
entire string is rejected. From the above figure, STRING2 is
entirely inside the clipping window and so it is kept and
STRING1 is rejected as it is partially inside the window.
 The following figure shows all or none character clipping −
13
 It is based on characters rather than on entire string. The string that
is inside the clipping window is kept, and if the string is outside the
window then:
 The portion of the string outside the window is rejected
 The entire character is discarded if the character is on the boundary
of the clipping window.
 Text clipping is depicted below:
14
 This method depends on characters method
than on the entire string method. The string
that is inside the clipping window is kept and
the string that is partially outside the window:
 The portion of the string outside the window
is rejected.
 The portion of the character that is outside of
the clipping window is discarded, if the
character is on the boundary of the clipping
window.
15

More Related Content

What's hot

Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
Mani Kanth
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
Harshana Madusanka Jayamaha
 
Mid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer GraphicsMid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer Graphics
Drishti Bhalla
 
Clipping
ClippingClipping
Clipping
Udayan Gupta
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
anku2266
 
And or search
And or searchAnd or search
And or search
Megha Sharma
 
sutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clippingsutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clipping
Arvind Kumar
 
Clipping
ClippingClipping
Clipping
AMIT VIRAMGAMI
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
Mani Kanth
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
Ummiya Mohammedi
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
Ankit Garg
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
Pooja Dixit
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clipping
Mani Kanth
 
Raster scan system
Raster scan systemRaster scan system
Raster scan system
Mohd Arif
 
stack & queue
stack & queuestack & queue
stack & queue
manju rani
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
Ankit Garg
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Lahiru Danushka
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
Punyajoy Saha
 

What's hot (20)

Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
 
Mid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer GraphicsMid point line Algorithm - Computer Graphics
Mid point line Algorithm - Computer Graphics
 
Clipping
ClippingClipping
Clipping
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
And or search
And or searchAnd or search
And or search
 
sutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clippingsutherland- Hodgeman Polygon clipping
sutherland- Hodgeman Polygon clipping
 
Clipping
ClippingClipping
Clipping
 
Demand paging
Demand pagingDemand paging
Demand paging
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
 
Depth Buffer Method
Depth Buffer MethodDepth Buffer Method
Depth Buffer Method
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
 
Cohen sutherland line clipping
Cohen sutherland line clippingCohen sutherland line clipping
Cohen sutherland line clipping
 
Raster scan system
Raster scan systemRaster scan system
Raster scan system
 
stack & queue
stack & queuestack & queue
stack & queue
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 

Similar to Clipping

Clipping
ClippingClipping
Clipping
ClippingClipping
Clipping
Mohd Arif
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
Amol Gaikwad
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
avelraj
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
Shweta Shah
 
CAD/CAM/CAE - Notes
CAD/CAM/CAE - NotesCAD/CAM/CAE - Notes
CAD/CAM/CAE - Notes
Learn With GeekAlign
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptx
KelvinDube4
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptx
KelvinDube4
 
Group 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptx
KelvinDube4
 
Clipping
ClippingClipping
Clipping
nehrurevathy
 
line clipping
line clipping line clipping
line clipping
Saurabh Soni
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
ABDULSAMADKAZI
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
nabingyawali5
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
sandeshbhusal6
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.ppt
GaganvirKaur
 
ch4.pptx
ch4.pptxch4.pptx
ch4.pptx
OnkarTalekar4
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
Rohit Jain
 
iuyf.pptx
iuyf.pptxiuyf.pptx
iuyf.pptx
nabingyawali5
 
ANPR based Security System Using ALR
ANPR based Security System Using ALRANPR based Security System Using ALR
ANPR based Security System Using ALR
Ashok Basnet
 
ytdty.pptx
ytdty.pptxytdty.pptx
ytdty.pptx
sandeshbhusal6
 

Similar to Clipping (20)

Clipping
ClippingClipping
Clipping
 
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
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
 
Windowing clipping
Windowing   clippingWindowing   clipping
Windowing clipping
 
CAD/CAM/CAE - Notes
CAD/CAM/CAE - NotesCAD/CAM/CAE - Notes
CAD/CAM/CAE - Notes
 
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
 
Group 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptx
 
Clipping
ClippingClipping
Clipping
 
line clipping
line clipping line clipping
line clipping
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
 
Lecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.pptLecture1616_16827_2D Clipping.ppt
Lecture1616_16827_2D Clipping.ppt
 
ch4.pptx
ch4.pptxch4.pptx
ch4.pptx
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
 
iuyf.pptx
iuyf.pptxiuyf.pptx
iuyf.pptx
 
ANPR based Security System Using ALR
ANPR based Security System Using ALRANPR based Security System Using ALR
ANPR based Security System Using ALR
 
ytdty.pptx
ytdty.pptxytdty.pptx
ytdty.pptx
 

More from Pooja Dixit

Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
number system.pptx
number system.pptxnumber system.pptx
number system.pptx
Pooja Dixit
 
Multiplexer.pptx
Multiplexer.pptxMultiplexer.pptx
Multiplexer.pptx
Pooja Dixit
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
Pooja Dixit
 
K-Map.pptx
K-Map.pptxK-Map.pptx
K-Map.pptx
Pooja Dixit
 
Karnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptxKarnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptx
Pooja Dixit
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptx
Pooja Dixit
 
Gray Code.pptx
Gray Code.pptxGray Code.pptx
Gray Code.pptx
Pooja Dixit
 
Flip Flop.pptx
Flip Flop.pptxFlip Flop.pptx
Flip Flop.pptx
Pooja Dixit
 
Encoder.pptx
Encoder.pptxEncoder.pptx
Encoder.pptx
Pooja Dixit
 
De-multiplexer.pptx
De-multiplexer.pptxDe-multiplexer.pptx
De-multiplexer.pptx
Pooja Dixit
 
DeMorgan’s Theory.pptx
DeMorgan’s Theory.pptxDeMorgan’s Theory.pptx
DeMorgan’s Theory.pptx
Pooja Dixit
 
Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
Boolean Algebra.pptx
Boolean Algebra.pptxBoolean Algebra.pptx
Boolean Algebra.pptx
Pooja Dixit
 
Binary Multiplication & Division.pptx
Binary Multiplication & Division.pptxBinary Multiplication & Division.pptx
Binary Multiplication & Division.pptx
Pooja Dixit
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
Pooja Dixit
 
Basics of Computer Organization.pptx
Basics of Computer Organization.pptxBasics of Computer Organization.pptx
Basics of Computer Organization.pptx
Pooja Dixit
 
Decoders
DecodersDecoders
Decoders
Pooja Dixit
 
Three Address code
Three Address code Three Address code
Three Address code
Pooja Dixit
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projection
Pooja Dixit
 

More from Pooja Dixit (20)

Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
 
number system.pptx
number system.pptxnumber system.pptx
number system.pptx
 
Multiplexer.pptx
Multiplexer.pptxMultiplexer.pptx
Multiplexer.pptx
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
K-Map.pptx
K-Map.pptxK-Map.pptx
K-Map.pptx
 
Karnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptxKarnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptx
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptx
 
Gray Code.pptx
Gray Code.pptxGray Code.pptx
Gray Code.pptx
 
Flip Flop.pptx
Flip Flop.pptxFlip Flop.pptx
Flip Flop.pptx
 
Encoder.pptx
Encoder.pptxEncoder.pptx
Encoder.pptx
 
De-multiplexer.pptx
De-multiplexer.pptxDe-multiplexer.pptx
De-multiplexer.pptx
 
DeMorgan’s Theory.pptx
DeMorgan’s Theory.pptxDeMorgan’s Theory.pptx
DeMorgan’s Theory.pptx
 
Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
 
Boolean Algebra.pptx
Boolean Algebra.pptxBoolean Algebra.pptx
Boolean Algebra.pptx
 
Binary Multiplication & Division.pptx
Binary Multiplication & Division.pptxBinary Multiplication & Division.pptx
Binary Multiplication & Division.pptx
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
 
Basics of Computer Organization.pptx
Basics of Computer Organization.pptxBasics of Computer Organization.pptx
Basics of Computer Organization.pptx
 
Decoders
DecodersDecoders
Decoders
 
Three Address code
Three Address code Three Address code
Three Address code
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projection
 

Recently uploaded

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
skuxot
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
ZainabHashmi17
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
ravindarpurohit26
 

Recently uploaded (20)

CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
 

Clipping

  • 1. Prof. Neeraj Bhargava Pooja Dixit Department of Computer Science School of Engineering & System Sciences MDS, University Ajmer, Rajasthan, India 1
  • 2.  Clipping Basics  Cohen-Sutherland Line Clipping  Clipping Polygons  Sutherland-Hodgman Clipping  Perspective Clipping 2
  • 3. 3  Clipping is a process that identifies those portions of a picture that are either inside or outside of a specified region or space is known as clipping.  Clip regions are commonly specified to improve render performance. A well-chosen clip allows the renderer to save time and energy by skipping clculations related to pixels that the user cannot seeworld coordinates Windowing I A scene is made up of a collection of objects specified in world coordinates View coordinates Windowing II When we display a scene only those objects within a particular window are displayed. world coordinates world coordinates WYmin WYmax WYmin WYmax WXmin WXmax WXmin WXmax Windowing III Because drawing things to a display takes time we clip everything outside the window
  • 4. 4  Consider an example in figure that shows which lines and points should be kept and which ones should be clipped.
  • 5.  What is Point Clipping?  Point clipping helps in identifying whether a particular point (X, Y) is within the window and accordingly take appropriate actions for using the coordinates of the window, either maximum or minimum.  If x satisfies that Wx1 ≤ X ≤ Wx2, then the coordinate X is inside the window, and if Y satisfies that Wy1 ≤ Y ≤ Wy2, then Y lies inside the window. 5
  • 6.  What is Line Clipping?  The part of the line inside the window is kept and the part of the line appearing outside is removed in Line Clipping.  Cohen-Sutherland Line Clippings  The clip window depicted below is used by this algorithm. 6
  • 7.  The entire region is divided by using 4-bits which represent Top, Bottom, Right, and Left of the region, As it is the TOP- LEFT corner, the TOP and LEFT bit is set to 1. 7
  • 8.  For the line, there are three different possibilities:  Line can be completely inside the window (This line should be accepted).  Line can be completely outside of the window (This line will be completely removed from the region).  Line can be partially inside the window (We will find intersection point and draw only that portion of line that is inside region). 8
  • 9.  Algorithm Step 1 – For each endpoints, a region code is assigned. Step 2 – The line is accepted if both endpoints have a region code 0000. Step 3 − Else, the logical AND operation is performed for both region codes. Step 3.1 − If the result is not 0000, then reject the line. Step 3.2 − Else clipping is required. Step 3.2.1 − An endpoint of the line is selected that is outside the window. Step 3.2.2 − Find the intersection point at the window boundary (base on region code). Step 3.2.3 – The endpoint is replaced with the intersection point and the region code is updated. Step 3.2.4 − Repeat step 2 until we find a clipped line either trivially accepted or trivially rejected. Step 4 − Repeat step 1 for other lines. 9
  • 10.  What is Polygon Clipping (Sutherland Hodgman Algorithm)?  Against the edges of the clipping window, the vertices of the polygon are clipped by using Sutherland Hodman Algorithm.  New vertices of the polygon are obtained by clipping the left edge of the polygon window. The polygon is clipped against right edge by using the new vertices as depicted below. 10
  • 11.  If the edge is not completely inside the clipping window, an intersection point appears. The portion that is outside is clipped as depicted below: 11
  • 12.  What is Text Clipping?  Text clipping can be provided in computer graphics by using different techniques. The characters are generated and the requirements of a particular application. Text clipping can be done in three different methods:  All or none string clipping  All or none character clipping  Text clipping  All or none string clipping is depicted below: 12
  • 13.  Under this method, either the entire string is kept or the entire string is rejected. From the above figure, STRING2 is entirely inside the clipping window and so it is kept and STRING1 is rejected as it is partially inside the window.  The following figure shows all or none character clipping − 13
  • 14.  It is based on characters rather than on entire string. The string that is inside the clipping window is kept, and if the string is outside the window then:  The portion of the string outside the window is rejected  The entire character is discarded if the character is on the boundary of the clipping window.  Text clipping is depicted below: 14
  • 15.  This method depends on characters method than on the entire string method. The string that is inside the clipping window is kept and the string that is partially outside the window:  The portion of the string outside the window is rejected.  The portion of the character that is outside of the clipping window is discarded, if the character is on the boundary of the clipping window. 15