SlideShare a Scribd company logo
Group 6 Presentation
Name
Takudzwa Mutambu
Ngonidzashe Mwendera
Gerald Matanhire
Devotion Masikati
Tapiwanashe Gwena
Shamiso Khumbula
Kelvin Dube
Assani Saidi
Reg Number
R192975T
R197295X
R1912448M
R1915853W
R1912331Z
R1913840M
R175251T
R194565B
Introduction
• The line clipping is a process in which we can cut the part of the line,
which lies outside the view pane. Only those lines are visible, which lie
inside the view pane.
• The Cohen-Sutherland line clipping algorithm is a common method
used in computer graphics to efficiently clip lines against a rectangular
clipping window. Line clipping is an important task in computer
graphics because it allows us to selectively display only the portions of
a line that are visible within a given viewport or window while
discarding the portions that lie outside of it. This can improve the
overall performance and visual quality of a graphics application,
particularly when rendering complex scenes.
• In this presentation, we will introduce the Cohen-Sutherland line
clipping algorithm, explain how it works, demonstrate its use with an
example, discuss its advantages and limitations.
Cohen-Sutherland Line Clipping
Algorithm
View Plane
How the algorithm works
• We will divide the view pane into nine equal segments that only serve the
viewport.
• We will represent the top, bottom, left, and right corner of the window with
4 bits. These 4 bits can be described with the following point:
• If an object lies within any particular corner position, that corner value will
be 1, else it will be 0.
• The allocation of bits depends on “TBRL” (Top, Bottom, Right, Left) rule.
• Suppose, if the point of a line appears in the top-left corner, then according
to TBRL, the value is 1001. We will allot the bits as-
• For the top corner, because the object is present at the top corner.
• For the bottom corner, because the object does not lie at the bottom.
• For the right corner, because the object does not lie at the right side.
• For the left corner, because the object lies at the top-left corner.
• In this way, we check TBRL for each segment and allot the bits accordingly.
Illustration of the TBRL rule
Line Viewing
• In Cohen- Sutherland Algorithm we will divide the lines into
following Sections
• Visible Line: When both points (starting and ending) of the
line are entirely situated inside the window.
• Invisible Line: When both points (Starting and ending) of
the line are completely situated outside the window.
• Clipped Line: Everyline has two endpoints. Let (x0, y0) and
(x1, y1) are points of the line. If one point of the line situated
inside the window and the other one is outside the
window, then the line is known as Clipped Line.
Steps when using the Algorithm
1.Determine the region codes for the endpoints of
the line.
2.Check if both endpoints are within the clipping
window (region code = 0000). If they are, the
line is completely inside the window and can be
displayed.
3.If both endpoints have a region code that has a
common bit value of 1, the line is completely
outside the clipping window and can be rejected.
Step 4
• If the line is partially inside the clipping window, perform line
clipping using the following steps:
• a. Find the intersection of the line with the clipping window
boundaries.
• b. If an endpoint lies outside the clipping window, replace it
with the intersection point.
• c. Recalculate the region codes for the new endpoints.
• d. Repeat steps b and c until both endpoints lie within the
clipping window or the line is completely outside.
Example
In the below-mentioned example, we have
different lines. The different category of the line
Example
• Line AB is a clipped case.
• The line CD is completely visible.
• Line EF is completely invisible.
• Line GH is a clipped case.
• Line KL is completely invisible.
• Line IJ is a clipped case.
Endpoints of the Lines
• The endpoints of lines are lies as follow
• A ? 0000
• B ? 1010
• C ? 0000
• D ? 0000
• E ? 0100
• F ? 0100
• G ? 0001
• H ? 0000
• I ? 0000
• J ? 0010
• K ? 1000
• L ? 1000
Applications of the Algorithm
1. Line Clipping in Computer Graphics: The primary application
of the Cohen-Sutherland algorithm is in line clipping for
rendering graphics. It efficiently determines which portions of
a line lie inside or outside a given clipping window, allowing
for the rendering of only the visible parts of the line. This helps
optimize the rendering process and improve the overall
efficiency of graphics systems.
2. Window and Viewport Clipping: The Cohen-Sutherland
algorithm can be used for window and viewport clipping in
graphical user interfaces (GUIs). It determines which portions
of a window or viewport lie within the visible area, ensuring
that only the visible content is displayed. This is particularly
useful when working with large documents or images that
need to be displayed within a limited viewing area.
Applications
1. Line Clipping in CAD Systems: Computer-aided design (CAD)
systems often make use of the Cohen-Sutherland algorithm
for line clipping operations. It enables the efficient
manipulation and display of lines and geometries within the
CAD environment. The algorithm ensures that only the visible
portions of lines are displayed, allowing designers and
engineers to work with accurate and visually appealing
representations.
2. Image Processing and Digital Photography: In image
processing and digital photography applications, the Cohen-
Sutherland algorithm can be utilized for cropping or trimming
images. It allows for the precise selection of regions of
interest and removal of unwanted portions, resulting in
improved composition and visual aesthetics.
Advantages of the algorithm
• Ability to handle arbitrary clipping windows: The algorithm can handle
clipping windows of any shape, not just rectangular ones. This makes it
more flexible and versatile than other clipping algorithms that are
limited to rectangular windows.
• Efficiency in handling many different types of lines: The algorithm is
efficient in handling many different types of lines, including vertical,
horizontal, and diagonal lines. It can also handle lines of any slope,
including those that are steep or nearly horizontal.
• Easy to implement: The algorithm is relatively easy to implement and
can be adapted to a variety of programming languages and
environments.
Limitations
• Inability to handle curved lines: The algorithm is not capable of
handling curved lines, which can be a significant limitation in some
cases. Other algorithms, such as the Cyrus-Beck algorithm, can handle
curved lines but may not be as efficient as the Cohen-Sutherland
algorithm.
• Limited to line clipping: The Cohen-Sutherland algorithm is designed
specifically for line clipping and cannot be used for other types of
clipping, such as polygon clipping.
• Requires pre-processing: The algorithm requires pre-processing to
compute the two-bit codes for each point or line segment, which can
add some overhead to the overall clipping process.

More Related Content

Similar to Group 6 Presentation - Copy.pptx

CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)
Priscilla CPG
 
Bhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh window clipping slidshare
Bhavesh window clipping slidshare
Bhavesh Panchal
 
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
 
Cohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmCohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithm
Tawfiq Ahmed
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
sandeshbhusal6
 
CAD
CAD CAD
lecture8 clipping
lecture8 clippinglecture8 clipping
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
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithm
KKARUNKARTHIK
 
AUTOCAD SOFTWAE ppt
AUTOCAD  SOFTWAE pptAUTOCAD  SOFTWAE ppt
AUTOCAD SOFTWAE ppt
G R INFRAPROJECTS LTD.
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdf
prakashvs7
 
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
VivekKumar148171
 
Dot matrix display design using fpga
Dot matrix display design using fpgaDot matrix display design using fpga
Dot matrix display design using fpga
Hossam Hassan
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notes
KushKumar293234
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
Harshana Madusanka Jayamaha
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
nabingyawali5
 
Digital design of maxillary of rpd's
Digital design of maxillary of rpd'sDigital design of maxillary of rpd's
Clipping
ClippingClipping
Clipping
nehrurevathy
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Mani Kanth
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
Rohit Jain
 

Similar to Group 6 Presentation - Copy.pptx (20)

CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)CAD - Unit-1 (Fundamentals of Computer Graphics)
CAD - Unit-1 (Fundamentals of Computer Graphics)
 
Bhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh window clipping slidshare
Bhavesh window clipping slidshare
 
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
 
Cohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmCohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithm
 
kgv.pptx
kgv.pptxkgv.pptx
kgv.pptx
 
CAD
CAD CAD
CAD
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithm
 
AUTOCAD SOFTWAE ppt
AUTOCAD  SOFTWAE pptAUTOCAD  SOFTWAE ppt
AUTOCAD SOFTWAE ppt
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdf
 
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
 
Dot matrix display design using fpga
Dot matrix display design using fpgaDot matrix display design using fpga
Dot matrix display design using fpga
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notes
 
Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )Clipping ( Cohen-Sutherland Algorithm )
Clipping ( Cohen-Sutherland Algorithm )
 
ibuib.pptx
ibuib.pptxibuib.pptx
ibuib.pptx
 
Digital design of maxillary of rpd's
Digital design of maxillary of rpd'sDigital design of maxillary of rpd's
Digital design of maxillary of rpd's
 
Clipping
ClippingClipping
Clipping
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithms
 

More from KelvinDube4

CLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptxCLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptx
KelvinDube4
 
introduction.pptx
introduction.pptxintroduction.pptx
introduction.pptx
KelvinDube4
 
boundary_security.pptx
boundary_security.pptxboundary_security.pptx
boundary_security.pptx
KelvinDube4
 
DATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptxDATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptx
KelvinDube4
 
Fundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.pptxFundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.pptx
KelvinDube4
 
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
 

More from KelvinDube4 (7)

CLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptxCLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptx
 
introduction.pptx
introduction.pptxintroduction.pptx
introduction.pptx
 
boundary_security.pptx
boundary_security.pptxboundary_security.pptx
boundary_security.pptx
 
DATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptxDATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptx
 
Fundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.pptxFundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.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
 

Recently uploaded

Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
Márton Kodok
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
hyfjgavov
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
ihavuls
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
a9qfiubqu
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 

Recently uploaded (20)

Build applications with generative AI on Google Cloud
Build applications with generative AI on Google CloudBuild applications with generative AI on Google Cloud
Build applications with generative AI on Google Cloud
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
 
A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
原版一比一弗林德斯大学毕业证(Flinders毕业证书)如何办理
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 

Group 6 Presentation - Copy.pptx

  • 1. Group 6 Presentation Name Takudzwa Mutambu Ngonidzashe Mwendera Gerald Matanhire Devotion Masikati Tapiwanashe Gwena Shamiso Khumbula Kelvin Dube Assani Saidi Reg Number R192975T R197295X R1912448M R1915853W R1912331Z R1913840M R175251T R194565B
  • 2. Introduction • The line clipping is a process in which we can cut the part of the line, which lies outside the view pane. Only those lines are visible, which lie inside the view pane. • The Cohen-Sutherland line clipping algorithm is a common method used in computer graphics to efficiently clip lines against a rectangular clipping window. Line clipping is an important task in computer graphics because it allows us to selectively display only the portions of a line that are visible within a given viewport or window while discarding the portions that lie outside of it. This can improve the overall performance and visual quality of a graphics application, particularly when rendering complex scenes. • In this presentation, we will introduce the Cohen-Sutherland line clipping algorithm, explain how it works, demonstrate its use with an example, discuss its advantages and limitations.
  • 5. How the algorithm works • We will divide the view pane into nine equal segments that only serve the viewport. • We will represent the top, bottom, left, and right corner of the window with 4 bits. These 4 bits can be described with the following point: • If an object lies within any particular corner position, that corner value will be 1, else it will be 0. • The allocation of bits depends on “TBRL” (Top, Bottom, Right, Left) rule. • Suppose, if the point of a line appears in the top-left corner, then according to TBRL, the value is 1001. We will allot the bits as- • For the top corner, because the object is present at the top corner. • For the bottom corner, because the object does not lie at the bottom. • For the right corner, because the object does not lie at the right side. • For the left corner, because the object lies at the top-left corner. • In this way, we check TBRL for each segment and allot the bits accordingly.
  • 7. Line Viewing • In Cohen- Sutherland Algorithm we will divide the lines into following Sections • Visible Line: When both points (starting and ending) of the line are entirely situated inside the window. • Invisible Line: When both points (Starting and ending) of the line are completely situated outside the window. • Clipped Line: Everyline has two endpoints. Let (x0, y0) and (x1, y1) are points of the line. If one point of the line situated inside the window and the other one is outside the window, then the line is known as Clipped Line.
  • 8. Steps when using the Algorithm 1.Determine the region codes for the endpoints of the line. 2.Check if both endpoints are within the clipping window (region code = 0000). If they are, the line is completely inside the window and can be displayed. 3.If both endpoints have a region code that has a common bit value of 1, the line is completely outside the clipping window and can be rejected.
  • 9. Step 4 • If the line is partially inside the clipping window, perform line clipping using the following steps: • a. Find the intersection of the line with the clipping window boundaries. • b. If an endpoint lies outside the clipping window, replace it with the intersection point. • c. Recalculate the region codes for the new endpoints. • d. Repeat steps b and c until both endpoints lie within the clipping window or the line is completely outside.
  • 10. Example In the below-mentioned example, we have different lines. The different category of the line
  • 11. Example • Line AB is a clipped case. • The line CD is completely visible. • Line EF is completely invisible. • Line GH is a clipped case. • Line KL is completely invisible. • Line IJ is a clipped case.
  • 12. Endpoints of the Lines • The endpoints of lines are lies as follow • A ? 0000 • B ? 1010 • C ? 0000 • D ? 0000 • E ? 0100 • F ? 0100 • G ? 0001 • H ? 0000 • I ? 0000 • J ? 0010 • K ? 1000 • L ? 1000
  • 13. Applications of the Algorithm 1. Line Clipping in Computer Graphics: The primary application of the Cohen-Sutherland algorithm is in line clipping for rendering graphics. It efficiently determines which portions of a line lie inside or outside a given clipping window, allowing for the rendering of only the visible parts of the line. This helps optimize the rendering process and improve the overall efficiency of graphics systems. 2. Window and Viewport Clipping: The Cohen-Sutherland algorithm can be used for window and viewport clipping in graphical user interfaces (GUIs). It determines which portions of a window or viewport lie within the visible area, ensuring that only the visible content is displayed. This is particularly useful when working with large documents or images that need to be displayed within a limited viewing area.
  • 14. Applications 1. Line Clipping in CAD Systems: Computer-aided design (CAD) systems often make use of the Cohen-Sutherland algorithm for line clipping operations. It enables the efficient manipulation and display of lines and geometries within the CAD environment. The algorithm ensures that only the visible portions of lines are displayed, allowing designers and engineers to work with accurate and visually appealing representations. 2. Image Processing and Digital Photography: In image processing and digital photography applications, the Cohen- Sutherland algorithm can be utilized for cropping or trimming images. It allows for the precise selection of regions of interest and removal of unwanted portions, resulting in improved composition and visual aesthetics.
  • 15. Advantages of the algorithm • Ability to handle arbitrary clipping windows: The algorithm can handle clipping windows of any shape, not just rectangular ones. This makes it more flexible and versatile than other clipping algorithms that are limited to rectangular windows. • Efficiency in handling many different types of lines: The algorithm is efficient in handling many different types of lines, including vertical, horizontal, and diagonal lines. It can also handle lines of any slope, including those that are steep or nearly horizontal. • Easy to implement: The algorithm is relatively easy to implement and can be adapted to a variety of programming languages and environments.
  • 16. Limitations • Inability to handle curved lines: The algorithm is not capable of handling curved lines, which can be a significant limitation in some cases. Other algorithms, such as the Cyrus-Beck algorithm, can handle curved lines but may not be as efficient as the Cohen-Sutherland algorithm. • Limited to line clipping: The Cohen-Sutherland algorithm is designed specifically for line clipping and cannot be used for other types of clipping, such as polygon clipping. • Requires pre-processing: The algorithm requires pre-processing to compute the two-bit codes for each point or line segment, which can add some overhead to the overall clipping process.