SlideShare a Scribd company logo
1 of 16
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 5 Presentation.pptx

Bhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh window clipping slidshare
Bhavesh window clipping slidshareBhavesh 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 clippingavelraj
 
Cohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmCohen sutherland line clipping algorithm
Cohen sutherland line clipping algorithmTawfiq Ahmed
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfAmol Gaikwad
 
Hidden line removal algorithm
Hidden line removal algorithmHidden line removal algorithm
Hidden line removal algorithmKKARUNKARTHIK
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdfprakashvs7
 
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
 
Dot matrix display design using fpga
Dot matrix display design using fpgaDot matrix display design using fpga
Dot matrix display design using fpgaHossam Hassan
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notesKushKumar293234
 
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 algorithmMani Kanth
 
Sutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsSutherlands Cohen and Hodgeman algorithms
Sutherlands Cohen and Hodgeman algorithmsRohit Jain
 
Auto cad ppt
Auto cad pptAuto cad ppt
Auto cad ppthrprt7696
 
Two marks with answers ME6501 CAD
Two marks with answers ME6501 CADTwo marks with answers ME6501 CAD
Two marks with answers ME6501 CADPriscilla CPG
 

Similar to Group 5 Presentation.pptx (20)

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 )
 
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
 
Auto cad ppt
Auto cad pptAuto cad ppt
Auto cad ppt
 
Two marks with answers ME6501 CAD
Two marks with answers ME6501 CADTwo marks with answers ME6501 CAD
Two marks with answers ME6501 CAD
 

More from KelvinDube4

CLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptxCLOUD_COMPUTING_PRESENTATION.pptx
CLOUD_COMPUTING_PRESENTATION.pptxKelvinDube4
 
introduction.pptx
introduction.pptxintroduction.pptx
introduction.pptxKelvinDube4
 
boundary_security.pptx
boundary_security.pptxboundary_security.pptx
boundary_security.pptxKelvinDube4
 
DATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptxDATA COM PRESENTATION-1.pptx
DATA COM PRESENTATION-1.pptxKelvinDube4
 
Fundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.pptxFundamental_Security_Design_Principles.pptx
Fundamental_Security_Design_Principles.pptxKelvinDube4
 
Group 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptxKelvinDube4
 
Group 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxKelvinDube4
 

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 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptxGroup 6 Presentation - Copy.pptx
Group 6 Presentation - Copy.pptx
 

Recently uploaded

VIP Kolkata Call Girl Lake Gardens 👉 8250192130 Available With Room
VIP Kolkata Call Girl Lake Gardens 👉 8250192130  Available With RoomVIP Kolkata Call Girl Lake Gardens 👉 8250192130  Available With Room
VIP Kolkata Call Girl Lake Gardens 👉 8250192130 Available With Roomdivyansh0kumar0
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Madekojalkojal131
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of JobRemote DBA Services
 
Notes of bca Question paper for exams and tests
Notes of bca Question paper for exams and testsNotes of bca Question paper for exams and tests
Notes of bca Question paper for exams and testspriyanshukumar97908
 
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiVIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一Fs sss
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...shivangimorya083
 
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service Cuttack
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service CuttackVIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service Cuttack
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service CuttackSuhani Kapoor
 
Preventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxPreventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxGry Tina Tinde
 
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...Suhani Kapoor
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsNiya Khan
 
Employee of the Month - Samsung Semiconductor India Research
Employee of the Month - Samsung Semiconductor India ResearchEmployee of the Month - Samsung Semiconductor India Research
Employee of the Month - Samsung Semiconductor India ResearchSoham Mondal
 
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...shivangimorya083
 
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳anilsa9823
 
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...Suhani Kapoor
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012sapnasaifi408
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...Suhani Kapoor
 
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Datingkojalkojal131
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterHector Del Castillo, CPM, CPMM
 
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Niya Khan
 

Recently uploaded (20)

VIP Kolkata Call Girl Lake Gardens 👉 8250192130 Available With Room
VIP Kolkata Call Girl Lake Gardens 👉 8250192130  Available With RoomVIP Kolkata Call Girl Lake Gardens 👉 8250192130  Available With Room
VIP Kolkata Call Girl Lake Gardens 👉 8250192130 Available With Room
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Job
 
Notes of bca Question paper for exams and tests
Notes of bca Question paper for exams and testsNotes of bca Question paper for exams and tests
Notes of bca Question paper for exams and tests
 
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service BhiwandiVIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
VIP Call Girl Bhiwandi Aashi 8250192130 Independent Escort Service Bhiwandi
 
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一 定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
定制(UOIT学位证)加拿大安大略理工大学毕业证成绩单原版一比一
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
 
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service Cuttack
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service CuttackVIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service Cuttack
VIP Call Girl Cuttack Aashi 8250192130 Independent Escort Service Cuttack
 
Preventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptxPreventing and ending sexual harassment in the workplace.pptx
Preventing and ending sexual harassment in the workplace.pptx
 
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...
VIP Call Girls Service Cuttack Aishwarya 8250192130 Independent Escort Servic...
 
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call GirlsSonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
Sonam +91-9537192988-Mind-blowing skills and techniques of Ahmedabad Call Girls
 
Employee of the Month - Samsung Semiconductor India Research
Employee of the Month - Samsung Semiconductor India ResearchEmployee of the Month - Samsung Semiconductor India Research
Employee of the Month - Samsung Semiconductor India Research
 
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
Full Masii Russian Call Girls In Dwarka (Delhi) 9711199012 💋✔💕😘We are availab...
 
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
 
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
 
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
VIP Call Girls Firozabad Aaradhya 8250192130 Independent Escort Service Firoz...
 
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen DatingDubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
Dubai Call Girls Starlet O525547819 Call Girls Dubai Showen Dating
 
PM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring ChapterPM Job Search Council Info Session - PMI Silver Spring Chapter
PM Job Search Council Info Session - PMI Silver Spring Chapter
 
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
Neha +91-9537192988-Friendly Ahmedabad Call Girls has Complete Authority for ...
 

Group 5 Presentation.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.