SlideShare ist ein Scribd-Unternehmen logo
1 von 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.

Weitere ähnliche Inhalte

Ähnlich wie Group 6 Presentation - Copy.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
 

Ähnlich wie Group 6 Presentation - Copy.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 )
 
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
 
Auto cad ppt
Auto cad pptAuto cad ppt
Auto cad ppt
 

Mehr von 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 5 Presentation.pptx
Group 5 Presentation.pptxGroup 5 Presentation.pptx
Group 5 Presentation.pptxKelvinDube4
 

Mehr von 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
 

KĂźrzlich hochgeladen

Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...amitlee9823
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx9to5mart
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramMoniSankarHazra
 

KĂźrzlich hochgeladen (20)

Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Rabindra Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Rabindra Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
hybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptxhybrid Seed Production In Chilli & Capsicum.pptx
hybrid Seed Production In Chilli & Capsicum.pptx
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Capstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics ProgramCapstone Project on IBM Data Analytics Program
Capstone Project on IBM Data Analytics Program
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 

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.