The majority of methods for line clipping make a rather large number of comparisons and involve a lot of calculations compared to modern ones. Most of the times, they are not so efficient as well as not so simple and applicable to the majority of cases. Besides the most popular ones, namely, Cohen-Sutherland, Liang-Barsky, Cyrus-Beck and Nicholl-Lee-Nicholl, other lineclipping methods have been presented over the years, each one having its own advantages and disadvantages. In this paper a new computation method for 2D line clipping against a rectangular window is introduced. The proposed method has been compared with the afore-mentioned ones as well as with two others; namely, Skala and Kodituwakku-Wijeweera-Chamikara, with respect to the number of operations performed and the computation time. The performance of the proposed method has been found to be better than all of the above-mentioned methods and it is found to be very fast, simple and can be implemented easily in any programming language or integrated development environment.
Another simple but faster method for 2 d line clippingijcga
The majority of methods for line clipping make a rather large number of comparisons and involve a lot of calculations compared to modern ones. Most of the times, they are not so
efficient as well as not so simple and applicable to the majority of cases. Besides the most popular ones, namely, Cohen-Sutherland, Liang-Barsky, Cyrus-Beck and Nicholl-Lee-Nicholl, other lineclipping methods have been presented over the years, each one having its own advantages and disadvantages. In this paper a new computation method for 2D line clipping against a rectangular window is introduced. The proposed method has been compared with the afore-mentioned ones as
well as with two others; namely, Skala and Kodituwakku-Wijeweera-Chamikara, with respect to the number of operations performed and the computation time. The performance of the proposed method has been found to be better than all of the above-mentioned methods and it is found to be very fast, simple and can be implemented easily in any programming language or integrated development environment.
IMPROVEMENTS OF THE ANALYSIS OF HUMAN ACTIVITY USING ACCELERATION RECORD OF E...sipij
The use of Holter Electrocardiograph (Holter ECG) is rapidly spreading. It is a wearableelectrocardiograph that records 24-hour electrocardiograms in a built-in flash memory, making it possibleto detect atrial fibrillation (Atrial Fibrillation, AF) through all-day activities. It is also useful for screeningfor diseases other than atrial fibrillation and for improving health. It is said that more useful informationcan be obtained by combining electrocardiograph with the analysis of physical activity. For that purpose,the Holter electrocardiograph is equipped with heart rate sensor and acceleration sensors. If accelerationdata is analysed, we can estimate activities in daily life, such as getting up, eating, walking, usingtransportation, and sitting. In combination with such activity status, electrocardiographic data can be expected to be more useful.
Another simple but faster method for 2 d line clippingijcga
The majority of methods for line clipping make a rather large number of comparisons and involve a lot of calculations compared to modern ones. Most of the times, they are not so
efficient as well as not so simple and applicable to the majority of cases. Besides the most popular ones, namely, Cohen-Sutherland, Liang-Barsky, Cyrus-Beck and Nicholl-Lee-Nicholl, other lineclipping methods have been presented over the years, each one having its own advantages and disadvantages. In this paper a new computation method for 2D line clipping against a rectangular window is introduced. The proposed method has been compared with the afore-mentioned ones as
well as with two others; namely, Skala and Kodituwakku-Wijeweera-Chamikara, with respect to the number of operations performed and the computation time. The performance of the proposed method has been found to be better than all of the above-mentioned methods and it is found to be very fast, simple and can be implemented easily in any programming language or integrated development environment.
IMPROVEMENTS OF THE ANALYSIS OF HUMAN ACTIVITY USING ACCELERATION RECORD OF E...sipij
The use of Holter Electrocardiograph (Holter ECG) is rapidly spreading. It is a wearableelectrocardiograph that records 24-hour electrocardiograms in a built-in flash memory, making it possibleto detect atrial fibrillation (Atrial Fibrillation, AF) through all-day activities. It is also useful for screeningfor diseases other than atrial fibrillation and for improving health. It is said that more useful informationcan be obtained by combining electrocardiograph with the analysis of physical activity. For that purpose,the Holter electrocardiograph is equipped with heart rate sensor and acceleration sensors. If accelerationdata is analysed, we can estimate activities in daily life, such as getting up, eating, walking, usingtransportation, and sitting. In combination with such activity status, electrocardiographic data can be expected to be more useful.
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSijaia
In this paper we propose a novel face recognition algorithm based on orientation histogram of Hough Transform Peaks. The novelty of the approach lies in utilizing Hough Transform peaks for determining the orientation angles and computing the histogram from it. For extraction of feature vectors first the images are divided into non overlapping blocks of equal size. Then for each of the blocks the orientation histograms are computed. The obtained histograms are combined to form the final feature vector set. Classification is done using k nearest neighbor classifier. The algorithm has been tested on the ORL
database, Yale B Database & the Essex Grimace Database.97% Recognition rates have been obtained for
ORL database, 100% for Yale B and 100% for Essex Grimace database
In stereo vision, the epipolar geometry is the intrinsic projective geometry between the two views. The
essential and fundamental matrices relate corresponding points in stereo images. The essential matrix
describes the geometry when the used cameras are calibrated, and the fundamental matrix expresses the
geometry when the cameras are uncalibrated. Since the nineties, researchers devoted a lot of effort to
estimate the fundamental matrix. Although it is a landmark of computer vision, in the current work, three
derivations of the essential and fundamental matrices have been revised. The Longuet-Higgins' derivation
of the essential matrix where he draws a mapping between the position vectors of a 3D point; however, the
one-to-one feature of that mapping is lost when he changed it to a relation between the image points. In the
two other derivations, we demonstrate that the authors established a mapping between the image points
through the misuse of mathematics.
Detection of oriented number plate in vehicle using autocorrection feature fr...csandit
The efficiency of an automatic number plate recognition system depends directly on the proper
effective preprocessing of the number plate. The OCRs available for recognition are capable of
reading the number plates which are in proper orientation of 00. In many situations the vehicle
number plates captured may be in any different orientation like 900, 1800 and 2700. These
orientations in number plates are due to declamping of number plate at one end or toppling of
vehicle. Such differently oriented number plates cannot be subjected for reading by OCRs and
such situations require the system to detect the direction of orientation and correct the same
before subjecting the same for reading. This paper proposes a work to detect the orientation of
segmented number plates from vehicle image using autocorrelation feature from gray level cooccurrence
matrix. A good volume of training samples are generated synthetically to train the
system and the system is tested using sufficient test samples. The results of system shows an
overall efficiency of 65.61% and performs an essential preprocessing in an automatic number
plate recognition system.
SHARP - A parallel algorithm for shape recognitionLeonardo Arcari
SHARP is a parallel algorithm for shape recognition designed by C. P. Ravikumar and Rajender Sethi.
In these slides I set the scenario, introduce the algorithm at high level and share the results I collected through my implementation in C++ on some test images
Sources: https://github.com/leonardoarcari/sharp
A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...iosrjce
IOSR Journal of Computer Engineering (IOSR-JCE) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of computer engineering and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in computer technology. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
Contour Line Tracing Algorithm for Digital Topographic MapsCSCJournals
Topographic maps contain information related to roads, contours, landmarks land covers and rivers etc. For any Remote sensing and GIS based project, creating a database using digitization techniques is a tedious and time consuming process especially for contour tracing. Contour line is very important information that these maps provide. They are mainly used for determining slope of the landforms or rivers. These contour lines are also used for generating Digital Elevation Model (DEM) for 3D surface generation from any satellite imagery or aerial photographs. This paper suggests an algorithm that can be used for tracing contour lines automatically from contour maps extracted from the topographical sheets and creating a database. In our approach, we have proposed a modified Moore's Neighbor contour tracing algorithm to trace all contours in the given topographic maps. The proposed approach is tested on several topographic maps and provides satisfactory results and takes less time to trace the contour lines compared with other existing algorithms.
Automatic Recognition of Isolated And Interacting Manufacturing Features In M...IJERA Editor
Manufacturing features play an important role between design information and manufacturing activities.
Recently, various efforts have been concentrated in development of automatic feature recognition systems.
However, only limited number of features could be recognized, intersecting features were generally not
involved. This paper presents a simple system, in which manufacturing features are easily detected using a
Chain of Faces and Base of Faces (CF-BF) graph. A feature is modeled by a series/parallel association of
opened Chain of Faces (OCF) or Closed chain of Faces (CCF) that rest on a Base Face (BF). The feature is
considered Perfect Manufacturing Feature (PMF) if all Faces that participate in constitution of OCF/CCF are
blank faces, else it is an Imperfect Manufacturing Feature (IMF). In order to establish news Virtual Faces to
satisfy this necessaries condition, a judicious analysis of orientation of frontier faces that rest on BF is
performed. The technique was tested on several parts taken from literature and the results were satisfying.
M ESH S IMPLIFICATION V IA A V OLUME C OST M EASUREijcga
We develop a polygonal mesh simplification algorithm based on a novel analysis of the mesh
geometry.
Particularly, we propose first a characterization of vertices as hyperbolic or non
-
hyperbolic depend
-
ing
upon their discrete local geometry. Subsequently, the simplification process computes a volume cost for
each non
-
hyperbolic vertex, in anal
-
ogy with spherical volume, to capture the loss of fidelity if that vertex
is decimated. Vertices of least volume cost are then successively deleted and the resulting holes re
-
triangulated using a method based on a novel heuristic. Preliminary experiments i
ndicate a performance
comparable to that of the best known mesh simplification algorithms
TOWARDS A UNIFIED IN-PROCESS GEOMETRIC MODEL FOR MULTIPLE MACHINING AND Layer...Liu PeiLing
There are many fabrication processes in modern manufacturing, but current modeling and simulation tools only simulate a few unit processes based on different geometry models. To overcome the data exchange problem between different models, this paper studies various in-process geometry models together with their working systems / prototypes for traditional manufacturing processes. Novel hybrid multiple-machining and layered manufacturing processes are presented to identify critical issues. Working towards a vision of pervasive modeling and simulation, a unified Voxel-based in-process geometry model for multiple-machining and layered manufacturing simulations is proposed and discussed.
Crest lines convey the inherent features of the shape. Mathematically Crest lines are described via extremes of the surface principal curvatures along their corresponding lines of curvature. In this study we used an automatic threshold estimation technique to estimate crest lines. We firstly computed the principal curvature and corresponding direction for each vertex in the mesh; then we computed the saliency value by a linear combination of the maximal absolute curvature and the absolute curvature difference; finally, we automatically determine the threshold to detect the crest lines according to the saliency value. For illustrative purpose, we demonstrated our method with several examples.
ESTIMATING THE CREST LINES ON POLYGONAL MESH MODELS BY AN AUTOMATIC THRESHOLDijcsit
Crest lines convey the inherent features of the shape. Mathematically Crest lines are described via extremes of the surface principal curvatures along their corresponding lines of curvature. In this study we used an automatic threshold estimation technique to estimate crest lines. We firstly computed the principal curvature and corresponding direction for each vertex in the mesh; then we computed the saliency value by a linear combination of the maximal absolute curvature and the absolute curvature difference; finally, we automatically determine the threshold to detect the crest lines according to the saliency value. For illustrative purpose, we demonstrated our method with several examples.
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKSijaia
In this paper we propose a novel face recognition algorithm based on orientation histogram of Hough Transform Peaks. The novelty of the approach lies in utilizing Hough Transform peaks for determining the orientation angles and computing the histogram from it. For extraction of feature vectors first the images are divided into non overlapping blocks of equal size. Then for each of the blocks the orientation histograms are computed. The obtained histograms are combined to form the final feature vector set. Classification is done using k nearest neighbor classifier. The algorithm has been tested on the ORL
database, Yale B Database & the Essex Grimace Database.97% Recognition rates have been obtained for
ORL database, 100% for Yale B and 100% for Essex Grimace database
In stereo vision, the epipolar geometry is the intrinsic projective geometry between the two views. The
essential and fundamental matrices relate corresponding points in stereo images. The essential matrix
describes the geometry when the used cameras are calibrated, and the fundamental matrix expresses the
geometry when the cameras are uncalibrated. Since the nineties, researchers devoted a lot of effort to
estimate the fundamental matrix. Although it is a landmark of computer vision, in the current work, three
derivations of the essential and fundamental matrices have been revised. The Longuet-Higgins' derivation
of the essential matrix where he draws a mapping between the position vectors of a 3D point; however, the
one-to-one feature of that mapping is lost when he changed it to a relation between the image points. In the
two other derivations, we demonstrate that the authors established a mapping between the image points
through the misuse of mathematics.
Detection of oriented number plate in vehicle using autocorrection feature fr...csandit
The efficiency of an automatic number plate recognition system depends directly on the proper
effective preprocessing of the number plate. The OCRs available for recognition are capable of
reading the number plates which are in proper orientation of 00. In many situations the vehicle
number plates captured may be in any different orientation like 900, 1800 and 2700. These
orientations in number plates are due to declamping of number plate at one end or toppling of
vehicle. Such differently oriented number plates cannot be subjected for reading by OCRs and
such situations require the system to detect the direction of orientation and correct the same
before subjecting the same for reading. This paper proposes a work to detect the orientation of
segmented number plates from vehicle image using autocorrelation feature from gray level cooccurrence
matrix. A good volume of training samples are generated synthetically to train the
system and the system is tested using sufficient test samples. The results of system shows an
overall efficiency of 65.61% and performs an essential preprocessing in an automatic number
plate recognition system.
SHARP - A parallel algorithm for shape recognitionLeonardo Arcari
SHARP is a parallel algorithm for shape recognition designed by C. P. Ravikumar and Rajender Sethi.
In these slides I set the scenario, introduce the algorithm at high level and share the results I collected through my implementation in C++ on some test images
Sources: https://github.com/leonardoarcari/sharp
A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...iosrjce
IOSR Journal of Computer Engineering (IOSR-JCE) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of computer engineering and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in computer technology. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
Contour Line Tracing Algorithm for Digital Topographic MapsCSCJournals
Topographic maps contain information related to roads, contours, landmarks land covers and rivers etc. For any Remote sensing and GIS based project, creating a database using digitization techniques is a tedious and time consuming process especially for contour tracing. Contour line is very important information that these maps provide. They are mainly used for determining slope of the landforms or rivers. These contour lines are also used for generating Digital Elevation Model (DEM) for 3D surface generation from any satellite imagery or aerial photographs. This paper suggests an algorithm that can be used for tracing contour lines automatically from contour maps extracted from the topographical sheets and creating a database. In our approach, we have proposed a modified Moore's Neighbor contour tracing algorithm to trace all contours in the given topographic maps. The proposed approach is tested on several topographic maps and provides satisfactory results and takes less time to trace the contour lines compared with other existing algorithms.
Automatic Recognition of Isolated And Interacting Manufacturing Features In M...IJERA Editor
Manufacturing features play an important role between design information and manufacturing activities.
Recently, various efforts have been concentrated in development of automatic feature recognition systems.
However, only limited number of features could be recognized, intersecting features were generally not
involved. This paper presents a simple system, in which manufacturing features are easily detected using a
Chain of Faces and Base of Faces (CF-BF) graph. A feature is modeled by a series/parallel association of
opened Chain of Faces (OCF) or Closed chain of Faces (CCF) that rest on a Base Face (BF). The feature is
considered Perfect Manufacturing Feature (PMF) if all Faces that participate in constitution of OCF/CCF are
blank faces, else it is an Imperfect Manufacturing Feature (IMF). In order to establish news Virtual Faces to
satisfy this necessaries condition, a judicious analysis of orientation of frontier faces that rest on BF is
performed. The technique was tested on several parts taken from literature and the results were satisfying.
M ESH S IMPLIFICATION V IA A V OLUME C OST M EASUREijcga
We develop a polygonal mesh simplification algorithm based on a novel analysis of the mesh
geometry.
Particularly, we propose first a characterization of vertices as hyperbolic or non
-
hyperbolic depend
-
ing
upon their discrete local geometry. Subsequently, the simplification process computes a volume cost for
each non
-
hyperbolic vertex, in anal
-
ogy with spherical volume, to capture the loss of fidelity if that vertex
is decimated. Vertices of least volume cost are then successively deleted and the resulting holes re
-
triangulated using a method based on a novel heuristic. Preliminary experiments i
ndicate a performance
comparable to that of the best known mesh simplification algorithms
TOWARDS A UNIFIED IN-PROCESS GEOMETRIC MODEL FOR MULTIPLE MACHINING AND Layer...Liu PeiLing
There are many fabrication processes in modern manufacturing, but current modeling and simulation tools only simulate a few unit processes based on different geometry models. To overcome the data exchange problem between different models, this paper studies various in-process geometry models together with their working systems / prototypes for traditional manufacturing processes. Novel hybrid multiple-machining and layered manufacturing processes are presented to identify critical issues. Working towards a vision of pervasive modeling and simulation, a unified Voxel-based in-process geometry model for multiple-machining and layered manufacturing simulations is proposed and discussed.
Crest lines convey the inherent features of the shape. Mathematically Crest lines are described via extremes of the surface principal curvatures along their corresponding lines of curvature. In this study we used an automatic threshold estimation technique to estimate crest lines. We firstly computed the principal curvature and corresponding direction for each vertex in the mesh; then we computed the saliency value by a linear combination of the maximal absolute curvature and the absolute curvature difference; finally, we automatically determine the threshold to detect the crest lines according to the saliency value. For illustrative purpose, we demonstrated our method with several examples.
ESTIMATING THE CREST LINES ON POLYGONAL MESH MODELS BY AN AUTOMATIC THRESHOLDijcsit
Crest lines convey the inherent features of the shape. Mathematically Crest lines are described via extremes of the surface principal curvatures along their corresponding lines of curvature. In this study we used an automatic threshold estimation technique to estimate crest lines. We firstly computed the principal curvature and corresponding direction for each vertex in the mesh; then we computed the saliency value by a linear combination of the maximal absolute curvature and the absolute curvature difference; finally, we automatically determine the threshold to detect the crest lines according to the saliency value. For illustrative purpose, we demonstrated our method with several examples.
Computational steering Interactive Design-through-Analysis for Simulation Sci...SURFevents
Computational steering has evolved with advances in computing and visualization technologies. This session will showcase interactive design-through-analysis techniques that seamlessly integrate computer-aided design and simulation-based analysis tools. The approach replaces traditional simulation-based analysis with IgANets, which embeds physics-informed machine learning into the Isogeometric Analysis paradigm. IgANets train parametrized deep networks to predict solution coefficients of B-Spline/NURBS representations, enabling instantaneous evaluation and interactive feedback loops. A first-of-its-kind demonstrator coupling IgANets with a novel user frontend, developed at SURF, will be presented to initiate a new trend in computational steering towards interactive design-through-analysis.
ICVG : Practical Constructive Volume Geometry for Indirect Visualization ijcga
The task of creating detailed three dimensional virtual worlds for interactive entertainment software can be simplified by using Constructive Solid Geometry (CSG) techniques. CSG allows artists to combine primitive shapes, visualized through polygons, into complex and believable scenery. Constructive Volume Geometry (CVG) is a super-set of CSG that operates on volumetric data, which consists of values recorded at constant intervals in three dimensions of space. To allow volumetric data to be integrated into existing frameworks, indirect visualization is performed by constructing and visualizing polygon meshes
corresponding to the implicit surfaces in the volumetric data. The Indirect CVG (ICVG) algebra, which
provides constructive volume geometry operators appropriate to volumetric data that will be indirectly visualized is introduced. ICVG includes operations analogous to the union, difference, and intersection operators in the standard CVG algebra, as well as new oper
ICVG: PRACTICAL CONSTRUCTIVE VOLUME GEOMETRY FOR INDIRECT VISUALIZATIONijcga
The task of creating detailed three dimensional virtual worlds for interactive entertainment software can be simplified by using Constructive Solid Geometry (CSG) techniques. CSG allows artists to combine primitive shapes, visualized through polygons, into complex and believable scenery. Constructive Volume Geometry (CVG) is a super-set of CSG that operates on volumetric data, which consists of values recorded at constant intervals in three dimensions of space. To allow volumetric data to be integrated into existing frameworks, indirect visualization is performed by constructing and visualizing polygon meshes corresponding to the implicit surfaces in the volumetric data. The Indirect CVG (ICVG) algebra, which provides constructive volume geometry operators appropriate to volumetric data that will be indirectly visualized is introduced. ICVG includes operations analogous to the union, difference, and intersection operators in the standard CVG algebra, as well as new operations. Additionally, a series of volumetric primitives well suited to indirect visualization is defined.
Digital Heritage Documentation Via TLS And Photogrammetry Case Studytheijes
In the last decade, several manual tradition measurement techniques were used to document the heritage buildings around the word; however, some of these techniques take a long time, often lack completeness, and may sometimes give unreliable information. In contrast, terrestrial laser scanning “TLS” surveys and Photogrammetry have already been undertaken in several heritage sites in the United Kingdom and other countries of Europe as a new method of documenting heritagesites. This paper focuses on using the TLS and Photogrammetry methods to document one of the important houses in Historic Jeddah, Saudi Arabia, which is Nasif Historical House, as an example of Digital Heritage Documentation (DHD).
Digital Heritage Documentation Via TLS And Photogrammetry Case Studytheijes
In the last decade, several manual tradition measurement techniques were used to document the heritage buildings around the word; however, some of these techniques take a long time, often lack completeness, and may sometimes give unreliable information. In contrast, terrestrial laser scanning “TLS” surveys and Photogrammetry have already been undertaken in several heritage sites in the United Kingdom and other countries of Europe as a new method of documenting heritagesites. This paper focuses on using the TLS and Photogrammetry methods to document one of the important houses in Historic Jeddah, Saudi Arabia, which is Nasif Historical House, as an example of Digital Heritage Documentation (DHD)
Web Graph Clustering Using Hyperlink Structureaciijournal
Now, information is useful for every environment in which time similarity is more important case. The most
of people are strongly interested in Internet. Web pages in the Internet are linked thorough hyperlinks that
contain useful information. By using hyperlinks, web graphs are constructed for time similarity web links in
which webs have been seen by users at past. These activities are needed to use for tracing who used the
websites for something at the time. So this paper provides the history of users who connect the person
started the news. We found that the normalized-cut method with the new similarity metric is particularly
effective, as demonstrated on a web log file
The graph theory, which studies the properties of the graphs, has been widely
accepted as a core subject in the knowledge of computer science. In this paper, we
produced a method for developing an algorithm. The effectiveness of testing is the most
important factor for determining the cost and the duration of the development of the
large software products with a given quality, so the cost of testing for detecting errors
in the software reaches 30-40% of the total cost of its development and largely
determines its quality. The most commonly used of the testing methods are regression,
function, load, module, and optimization test if the graph is sufficiently complex. The
graph accelerates the testing process. We see the ways that we need to test. When they
cover all graph paths, the algorithm of the program is fully tested and does not need
any further development.
GRAPH PARTITIONING FOR IMAGE SEGMENTATION USING ISOPERIMETRIC APPROACH: A REVIEWDrm Kapoor
Graph cut is fast method performing a binary segmentation. Graph cuts proved to be a useful multidimensional optimization tool which can enforce piecewise smoothness while preserving relevant sharp discontinuities. This paper is mainly intended as an application of isoperimetric algorithm of graph theory for image segmentation and analysis of different parameters used in the algorithm like generating weights, regulates the execution, Connectivity Parameter, cutoff, number of recursions. We present some basic background information on graph cuts and discuss major theoretical results, which helped to reveal both strengths and limitations of this surprisingly versatile combinatorial algorithm.
Reducing Render Time in Ray Tracing by Pixel Averaging ijcga
Many computer graphics rendering algorithms and techniques use ray tracing for generating natural and photo-realistic images. Ray tracing is a method to convert 3D-modeles into 2D-high quality images by
complex computation. The millions of rays must be simulated and traced to create realistic image. A
method for reducing render time is acceleration structures. The kd-tree is the most commonly used in accelerating ray tracing algorithms. This paper has focused on reducing render time. We propose tow methods that are combined with ray tracing method for obtaining some pixel colour of image plane. Our methods are linear algorithm and are faster than ray tracing method. Our results show that our methods are at least 50% faster than spatial median approach for reasonably complex scenes with around 70k
polygons and about 0.2% quality degradation. In this article, we show that these proposal methods can be
combined with other ray tracing methods such as SAH to reduce render time.
REDUCING RENDER TIME IN RAY TRACING BY PIXEL AVERAGINGijgca
Many computer graphics rendering algorithms and techniques use ray tracing for generating natural and photo-realistic images. Ray tracing is a method to convert 3D-modeles into 2D-high quality images by complex computation. The millions of rays must be simulated and traced to create realistic image. A
method for reducing render time is acceleration structures. The kd-tree is the most commonly used in accelerating ray tracing algorithms. This paper has focused on reducing render time. We propose tow methods that are combined with ray tracing method for obtaining some pixel colour of image plane. Our methods are linear algorithm and are faster than ray tracing method. Our results show that our methods are at least 50% faster than spatial median approach for reasonably complex scenes with around 70k polygons and about 0.2% quality degradation. In this article, we show that these proposal methods can be
combined with other ray tracing methods such as SAH to reduce render time.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...ssuser7dcef0
Power plants release a large amount of water vapor into the
atmosphere through the stack. The flue gas can be a potential
source for obtaining much needed cooling water for a power
plant. If a power plant could recover and reuse a portion of this
moisture, it could reduce its total cooling water intake
requirement. One of the most practical way to recover water
from flue gas is to use a condensing heat exchanger. The power
plant could also recover latent heat due to condensation as well
as sensible heat due to lowering the flue gas exit temperature.
Additionally, harmful acids released from the stack can be
reduced in a condensing heat exchanger by acid condensation. reduced in a condensing heat exchanger by acid condensation.
Condensation of vapors in flue gas is a complicated
phenomenon since heat and mass transfer of water vapor and
various acids simultaneously occur in the presence of noncondensable
gases such as nitrogen and oxygen. Design of a
condenser depends on the knowledge and understanding of the
heat and mass transfer processes. A computer program for
numerical simulations of water (H2O) and sulfuric acid (H2SO4)
condensation in a flue gas condensing heat exchanger was
developed using MATLAB. Governing equations based on
mass and energy balances for the system were derived to
predict variables such as flue gas exit temperature, cooling
water outlet temperature, mole fraction and condensation rates
of water and sulfuric acid vapors. The equations were solved
using an iterative solution technique with calculations of heat
and mass transfer coefficients and physical properties.
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Another Simple but Faster Method for 2D Line Clipping
1. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.1/2/3, July 2019
Another Simple but Faster Method for 2D
Line Clipping
Dimitrios Matthes and Vasileios Drakopoulos
Department of Computer Science and Biomedical Informatics,
School of Science, University of Thessaly,
Lamia 35131, Greece
Abstract. The majority of methods for line clipping make a rather large number of comparisons
and involve a lot of calculations compared to modern ones. Most of the times, they are not so
efficient as well as not so simple and applicable to the majority of cases. Besides the most popular
ones, namely, Cohen-Sutherland, Liang-Barsky, Cyrus-Beck and Nicholl-Lee-Nicholl, other line-
clipping methods have been presented over the years, each one having its own advantages and
disadvantages. In this paper a new computation method for 2D line clipping against a rectangular
window is introduced. The proposed method has been compared with the afore-mentioned ones as
well as with two others; namely, Skala and Kodituwakku-Wijeweera-Chamikara, with respect to
the number of operations performed and the computation time. The performance of the proposed
method has been found to be better than all of the above-mentioned methods and it is found to
be very fast, simple and can be implemented easily in any programming language or integrated
development environment.
Keywords: 2D Computer Graphics; Computer Graphics Education; Geometry; Line Clipping;
Programming Education; Computation method
1 Introduction and historical background
In computer graphics, any procedure that eliminates those portions of a picture that
are either inside or outside a specified region of space is referred to as a clipping
algorithm or simply clipping. The region against which an object is to be clipped
is called a clipping object. In two-dimensional clipping, if the clipping object is an
axis-aligned rectangular parallelogram, it is often called the clipping window or clip
window. Usually a clipping window is a rectangle in standard position, although we
could use any shape for a clipping application. For a three-dimensional scene it is
called a clipping region; see [9].
Line clipping is the process of removing lines or portions of lines outside an area
of interest. Typically, any line or part thereof which is outside of the viewing area
is removed (Fig. 1). Most of the times, this process uses mathematical equations
or formulas for removing the unecessary parts of the line. The programmer draws
only the part of the line which is visible and inside the desired region by using, for
example, the slope-intercept form y = mx+b, where m is the slope or gradient of the
DOI: 10.5121/ijcga.2019.9301 1
2. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 1. Region before (left) and after (right) 2D line clipping.
line, b is the y-intercept of the line and x is the independent variable of the function
y = f(x) or just the vector equation. The most common application of clipping is
in the viewing pipeline, where clipping is applied to extract a designated portion
of a scene (either two-dimensional or three-dimensional) for display on an output
device. Clipping methods are also used to antialias object boundaries, to construct
objects using solid-modelling methods, to manage a multiwindow environment and
to allow parts of a picture to be moved, copied, or erased in drawing and painting
programs; see for example [8] or [4].
There are four primary methods for line clipping: Cohen-Sutherland, Cyrus-
Beck [2], Liang-Barsky [15] and Nicholl-Lee-Nicholl [18]. Over the years, other algo-
rithms for line clipping appeared, like Fast Clipping [29], D¨orr [5], Andreev and Sofi-
anska [1], Day [3], Sharma and Manohar [24], Skala [25] [26] [27], Slater and Barsky
[28], Ray [23], [22] but many of them are variations of the first two ones; see [21] or
[14] for a different approach. In general, the existing line-clipping algorithms can
be classified into three types: the encoding approach (with the Cohen-Sutherland
algorithm as a representative), the parametric approach (with the Liang-Barsky
and the Cyrus-Beck algorithms as representatives) and the Midpoint Subdivision
algorithms.
The algorithm of Danny Cohen and Ivan Sutherland was developed in 1967
during the making of a flight simulator. It is considered to be one of the first
line-clipping algorithms in the computer graphics history. According to this, the
2D space in which the line resides is divided into nine regions. The algorithm
determines first in which regions the two points that define the line are in and then
performs complete, partial or no drawing of the line at all; see for example [6], p.
113 or [7] (Fig. 2). The method that is used to decide if a line is suitable for clipping
or not performs logical AND operation with the region codes or outcodes of the line
end points. After the logical AND, if the result is not 0000, the line is completely
outside the clipping region [10]. This technique is also referred to as Encoding and
Code Checking in [16].
2
3. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 2. The nine regions of the Cohen-Sutherland algorithm in the 2D space.
The method of Mike Cyrus and Jay Beck is a general line-clipping algorithm,
but it introduces extra floating point operations for determining the value of a
parameter corresponding to the intersection of the line to be clipped with each
window edge [11]. It is of O(N) complexity, where N is a number of facets, and
is primarily intended for clipping a line in the parametric form against a convex
polygon in two dimensions or against a convex polyhedron in three dimensions.
Midpoint subdivision algorithm is an extension of the Cyrus-Beck algorithm
and follows a divide and conquer strategy. It is mainly used to compute visible
areas of lines that are present in the view port of the sector or the image. It
follows the principle of the bisection method and works similarly to the Cyrus-
Beck algorithm by bisecting the line into equal halves. But unlike the Cyrus-Beck
algorithm, which only bisects the line once, Midpoint Subdivision Algorithm bisects
the line numerous times. The Midpoint Subdivision algorithm is not efficient unless
it is implemented in hardware.
On the other hand, You-Dong Liang and Brian Barsky have created an algo-
rithm that uses floating-point arithmetic for finding the appropriate end points with
at most four computations [19]. This algorithm uses the parametric equation of the
line and solves four inequalities to find the range of the parameter for which the
line is in the viewport [15]. The method of Liang-Barsky is very similar to Cyrus-
Beck line-clipping algorithm. The difference is that Liang-Barsky is a simplified
Cyrus-Beck variation that was optimised for a rectangular clip window; see Fig. 3.
In general, the Liang-Barsky algorithm is more efficient than the Cohen-Sutherland
line-clipping algorithm.
The Nicholl-Lee-Nicholl algorithm is a fast line-clipping algorithm that reduces
the chances of clipping a single line segment multiple times, as may happen in
3
4. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 3. Defining the line for clipping with the Liang-Barsky algorithm.
the Cohen-Sutherland algorithm. The clipping window is divided into a number
of different areas, depending on the position of the initial point of the line to be
clipped.
The algorithm of Skala [27] is based on homogeneous coordinates and duality.
It can be used for line or line-segment clipping against a rectangular window as
well as against a convex polygon. The algorithm is based on classifying a vertex
of the clipping window against a half-space given by a line p : ax + by + c = 0.
The result of the classification determines the edges intersected by the line p. The
algorithm is simple, easy to implement and extensible to a convex window as well.
The line or line segment p can be computed from points r1, r2 given in homogeneous
coordinates directly using the cross product as
p = r1 × r2 = (x1, y1, w1) × (x2, y2, w2)
or as
p = r1 × r2 = (x1, y1, 1) × (x2, y2, 1).
In 2013, a fast line clipping algorithm with slightly different approach from the
above ones was introduced by Kodituwakku-Wijeweere-Chamikara [13]. It is newer
and performs better than the Cohen-Sutherland and Liang-Barsky algorithms. It
checks every boundary of the clipping area (top, bottom, left, right) and performs
4
5. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
line clipping by using the equation of the line. Moreover, it checks if the line segment
is just a point or parallel to principle axes.
Depending on the programming language or integrated development environ-
ment, the implementation of each algorithm varies in speed. For example, the im-
plementation of the Cohen-Sutherland algorithm in Scratch requires a relatively
large number of bitwise AND operations for determining the regions that the line
resides. However, bitwise AND is not embedded in Scratch so the programmer
should have to create a function for this task which greatly impedes the algorithm.
Sometimes, it is difficult to implement or teach to others a line-clipping algorithm
because it uses either advanced mathematical concepts, like the Liang-Barsky, or it
is complicated by using many conditions and comparisons (if..then..else..) like the
Kodituwakku-Wijeweere-Chamikara.
The difficulties of the previous line-clipping algorithms seem to be overcomed
by the proposed one; see also [17]. Although it uses the main concept of the
Kodituwakku-Wijeweere-Chamikara algorithm, it avoids many unecessary compar-
isons like the parallel lines or the dots. It aims at simplicity and speed and does
only the necessary calculations in order to determine whether the beginning as well
as the end of the line are inside the clipping region. Moreover, it uses the minimum,
for all the tested algorithms, number of variables.
This article has the following structure. Section 2 presents the proposed line-
clipping method, Section 3 presents the results after comparing the proposed with
six other line-clipping algorithms (Cohen-Sutherland, Liang-Barsky, Cyrus-Beck,
Nicholl-Lee-Nicholl, Skala and Kodituwakku-Wijeweere-Chamikara) all implemented
in C++ with OpenGL, Section 4 presents the conclusions derived from the study
and usage of the algorithm in practice as well as suggestions for improvement and,
finally, Section 5 summarises all the findings reported above.
2 The proposed line-clipping algorithm
2.1 Methodology
Assume that we want to clip a line inside a rectangle region or window that is defined
by the points (xmin, ymax) and (xmax, ymin). This region is depicted in Fig. 4. Given
two points (x1, y1) and (x2, y2) on the line that we want to clip, the slope m of the
line is constant and is defined by the ratio
m =
y2 − y1
x2 − x1
. (1)
For an arbitrary point (x, y) on the line, the previous ratio can be written as
m =
y − y1
x − x1
.
5
6. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 4. Line-clipping region.
Solving for y
y − y1 = m(x − x1) ⇔ y = y1 + m(x − x1).
By replacing m in this equation with Eq. (1)
y = y1 +
y2 − y1
x2 − x1
(x − x1). (2)
Solving for x, the equation becomes
x = x1 +
x2 − x1
y2 − y1
(y − y1). (3)
Equations (2) and (3) are two mathematical representations of the line equation
y = mx + b and will be used later by the algorithm in order to determine the part
of the line that is inside the clipping window.
2.2 The basic steps
Suppose that the line which has to be clipped is defined by the points (x1, y1) and
(x2, y2).
Step 1 The first step of the algorithm checks, if both points are outside the line
clipping window and at the same time in the same region (top, bottom, right, left).
If one of the following occurs, then the entire line is being rejected and the algorithm
draws nothing (see Fig. 5):
6
7. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
x1 < xmin AND x2 < xmin (line is left to the clipping window)
x1 > xmax AND x2 > xmax (line is right to the clipping window)
y1 < ymin AND y2 < ymin (line is under the clipping window)
y1 > ymax AND y2 > ymax (line is over the clipping window)
Fig. 5. Lines A, B, C, D are rejected according to the first step of the algorithm.
Step 2 In the second step, the algorithm compares the coordinates of the two
points along with the boundaries of the clipping window. It compares each of the
x1 and x2 coordinates with the xmin and xmax boundaries respectively, as well as
each one of the y1 and y2 coordinates with the ymin and ymax boundaries. If any
of these coordinates are out of bounds, then the specific boundary is used in the
equation that determines the line in order to achieve clipping (see Fig. 6).
For each of the coordinates of the two points and according to Equations (2)
and (3), the comparisons and changes made are:
– If xi < xmin, then
xi = xmin
yi = y1 +
y2 − y1
x2 − x1
(xmin − x1)
7
8. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 6. Selecting the points of the line that are inside the clipping area.
– If xi > xmax, then
xi = xmax
yi = y1 +
y2 − y1
x2 − x1
(xmax − x1)
– If yi < ymin, then
yi = ymin
xi = x1 +
x2 − x1
y2 − y1
(ymin − x1)
– If yi > ymax, then
yi = ymax
xi = x1 +
x2 − x1
y2 − y1
(ymax − x1)
where i = 1, 2.
Step 3 The third and final step checks, if the new points, after the changes, are
inside the clipping region and, if so, a line is being drawn between them.
2.3 The algorithm in pseudo-code
The representation of the algorithm in pseudo-code follows:
// x1 , y1 , x2 , y2 , xmin , ymax , xmax , ymin //
i f not ( x1<xmin and x2<xmin ) and not ( x1>xmax and x2>xmax) then
i f not ( y1<ymin and y2<ymin ) and not ( y1>ymax and y2>ymax) then
x [1]= x1
y [1]= y1
x [2]= x2
y [2]= y2
i =1
8
9. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
r e p e a t
i f x [ i ] < xmin then
x [ i ] = xmin
y [ i ] = ( ( y2−y1 ) / ( x2−x1 ) ) ∗ ( xmin−x1)+y1
e l s e i f x [ i ] > xmax then
x [ i ] = xmax
y [ i ] = ( ( y2−y1 ) / ( x2−x1 ) ) ∗ ( xmax−x1)+y1
end i f
i f y [ i ] < ymin then
y [ i ] = ymin
x [ i ] = ( ( x2−x1 ) / ( y2−y1 ) ) ∗ ( ymin−y1)+x1
e l s e i f y [ i ] > ymax then
y [ i ] = ymax
x [ i ] = ( ( x2−x1 ) / ( y2−y1 ) ) ∗ ( ymax−y1)+x1
end i f
i = i + 1
u n t i l i >2
i f not ( x [1] < xmin and x [2] < xmin ) and not ( x [1] >xmax and x [2] >xmax) then
drawLine ( x [ 1 ] , y [ 1 ] , x [ 2 ] , y [ 2 ] )
end i f
end i f
end i f
3 Evaluation of the proposed algorithm
Preparation
In order to determine the efficiency of the proposed algorithm we decided to com-
pare it with the six others: Cohen-Sutherland, Liang-Barsky, Cyrus-Beck, Nicholl-
Lee-Nicholl, Skala and Kodituwakku-Wijeweere-Chamikara.
The combination of C++ and OpenGL was a good choice for evaluating the
proposed algorithm for the following reasons: a) C++ along with OpenGL is a
professional programming environment in computer graphics, b) OpenGL uses ef-
ficiently the computer’s hardware as well as the graphics adapter, c) C++ is faster
than many other programming languages, d) OpenGL is a portable language and
the code can be tested easily in other operating systems or computers [9].
The experiment The experiment was the following: Each one of the six eval-
uated algorithms would have to create a large number of arbitrary lines in a
two-dimensional space. Such a space is determined by the points (−960, 720) and
(960, −720). The line-clipping window should be at the centre of the screen and
defined by the points (−100, 75) and (100, −75), in other words 200 pixels in width
and 150 pixels in height (see Fig. 7). As someone may notice, the proportion of
the screen and the clipping window is the same for both horizontal and vertical
axis. The lines would be randomly generated anywhere in the 2D space and each
algorithm would have to draw only the visible part of the lines inside the clipping
window.
The time that each algorithm needs to clip and draw this large number of lines
is recorded in every execution. The whole process is repeated 10 times and at the
end the average time is being calculated.
9
10. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 7. Defining the 2D space for creating random line as well as definition of the line-clipping
window.
Hardware and software specifications For realistic results, an average com-
puter system was used for the experiment. The hardware as well as the software
specifications were: a) Intel Core2Duo @ 2.60GHz CPU, b) RAM 2GB, c) AMD
Radeon HD 5450 GPU, d) Windows 10 Professional operating system, e) Microsoft
Visual C++ 2017 Enterprise Edition with OpenGL and glut v3.7 library.
Results We decided that each algorithm should draw 1,000,000 lines in every
execution. The results are shown in Table 1.
Table 1. Execution times of each algorithm when creating 1,000,000 lines in C++ with OpenGL
Exec. CS LB CB NLN Skala KWC Prop.
(sec) (sec) (sec) (sec) (sec) (sec) (sec)
1 1.302 1.264 1.446 1.577 1.234 1.216 1.182
2 1.362 1.233 1.425 1.376 1.313 1.224 1.125
3 1.453 1.225 1.471 1.437 1.299 1.196 1.097
4 1.359 1.460 1.530 1.446 1.239 1.271 1.176
5 1.407 1.263 1.519 1.455 1.337 1.297 1.151
6 1.286 1.233 1.418 1.505 1.256 1.268 1.216
7 1.295 1.182 1.439 1.427 1.352 1.275 1.076
8 1.446 1.205 1.658 1.332 1.365 1.223 1.209
9 1.420 1.218 1.423 1.448 1.248 1.217 1.214
10 1.319 1.272 1.462 1.450 1.456 1.251 1.199
Avg: 1.365 1.256 1.479 1.445 1.310 1.244 1.165
10
11. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Finally, for a better evaluation of the previous results, the algorithms were
executed again in C++ with OpenGL but this time 10,000,000 lines had to be
clipped. The average time was noted down and the results can be seen in Table 2.
Table 2. Execution times of each algorithm when creating 10,000,000 lines in C++ with OpenGL
Exec. CS LB CB NLN Skala KWC Prop.
(sec) (sec) (sec) (sec) (sec) (sec) (sec)
1 12.141 11.450 13.253 12.862 11.693 11.358 10.414
2 11.717 11.628 12.990 13.273 11.823 11.717 10.138
3 12.064 11.783 13.047 13.836 11.644 11.091 10.370
4 11.605 11.359 13.978 12.763 11.819 11.779 10.757
5 11.693 10.978 13.268 12.707 11.579 10.741 10.517
6 11.643 10.953 14.269 13.043 11.739 10.885 10.351
7 11.733 11.224 13.597 12.723 12.114 10.823 10.423
8 11.880 11.009 13.805 13.010 11.820 11.102 10.451
9 11.917 10.948 13.350 12.825 11.754 11.114 10.473
10 12.221 10.936 13.811 12.649 11.757 10.756 10.387
Avg: 11.861 11.227 13.537 12.969 11.774 11.137 10.428
4 Conclusions
In Fig. 8 the graph of each case by using all data from the previous tables is
illustrated. By using the average time of the algorithms executed in C++ with
OpenGL for 1,000,000 lines and
|proposed − previous|
proposed
× 100
we can see that that the proposed algorithm is 17.17% faster than the Cohen-
Sutherland, 7.81% faster than the Liang-Barsky, 26.95% faster than the Cyrus-
Beck, 24.03% than the Nicholl-Lee-Nicholl, 12.45% than the Skala and 6.78% faster
than the Kodituwakku-Wijeweere-Chamikara algorithm. When the number of lines
increases to 10,000,000, these time percentages are more or less the same; see Fig. 9.
To be more specific, the proposed algorithm is 13.74% faster than the Cohen-
Sutherland, 7.66% faster than the Liang-Barsky, 29.81% faster than the Cyrus-
Beck, 24.37% than the Nicholl-Lee-Nicholl, 12.91% than the Skala and 6.80% faster
than the Kodituwakku-Wijeweere-Chamikara algorithm.
As mentioned before, each algorithm has advantages and disadvantages. The
Cohen-Sutherland algorithm is the oldest of all algorithms, it has an average per-
formance comparing to the other five but it is difficult to implement in some pro-
gramming environments, e.g. Scratch, due to the bitwise AND operations that it
requires.
11
12. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 8. Graph with the average time of each algorithm for 1,000,000 in C++ with OpenGL (from
lower to higher value).
The Liang-Barsky algorithm performs very well and is almost as fast as the
Kodituwakku-Wijeweere-Chamikara algorithm which was the faster algorithm af-
ter the proposed one. Liang-Barsky’s main drawback is that it is slightly more
difficult than the others to understand since it contains more advanced mathemat-
ical concepts.
The Cyrus-Beck algorithm looks like the Liang-Barksy, has the worst perfor-
mance comparing to all the others and uses advanced mathematical concepts, too.
But why should someone use this algorithm? A quick answer to this question could
be: Because it can be modified very easily in order to clip polygons instead of lines.
The Nicholl-Lee-Nicholl algorithm is rather slow since it is faster only than the
Cyrus-Beck. It uses a large number of subcases and subroutines for clipping a simple
line and, as a result, it produces very long programs with many lines of code. An
advantage of this algorithm is that it is easier to understand than others and thus
to implement.
Finally, Skala as well as Kodituwakku-Wijeweere-Chamikara algorithm use a
different approach than the popular ones, although fast they use a lot of conditions
which make them more complicated and slower than the proposed one.
5 Summary
There are many line-clipping algorithms in computer graphics. Each one has advan-
tages and disadvantages. Cohen-Sutherland is the simplest line-clipping algorithm,
but the Liang-Barsky algorithm is more efficient, since intersection calculations
are reduced. Overall, the afore-mentioned experimental results indicate that the
proposed algorithm is simpler, faster and it certainly performs better than other
known 2D line-clipping algorithms. It uses only a small number of variables and it
12
13. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
Fig. 9. Graph with the average time of each algorithm for 10,000,000 in C++ with OpenGL (from
lower to higher value).
is very easy to implement in any programming language or integrated development
environment. Both the Cohen-Sutherland and Liang-Barsky algorithms can be ex-
tended to three-dimensional clipping. Nicholl-Lee-Nicholl cannot extend to three-
dimensional clipping. An interesting extension of the proposed algorithm would be
clipping in three dimensions; see [12], [20].
References
1. R. Andreev and Elena Sofianska. New algorithm for two-dimensional line clipping. Comput.
Graph., 15(4):519–526, 1991.
2. M. Cyrus and J. Beck. Generalized two- and three-dimensional clipping. Comput. Graph.,
3:23–28, 1978.
3. J. D. Day. An algorithm for clipping lines in object and image space. Comput. Graph.,
16(4):421–426, 1992.
4. S. C. Dimri. A simple and efficient algorithm for line and polygon clipping in 2-D computer
graphics. International Journal of Computer Applications, 127(3):31–34, 2015.
5. M. D¨orr. A new approach to parametric line clipping. Comput. Graph., 14(3/4):449–464,
1990.
6. J. D. Foley, A. van Dam, S. K. Feiner, and J. F. Hughes. Computer Graphics Principles and
Practice. Addison-Wesley, Reading, MA, 2nd edition, 1990.
7. A. P. Godse and Deepali A. Godse. Computer Graphics. Technical Publications, 2008.
8. D. Hearn and M. P. Baker. Computer Graphics C Version. Prentice Hall, 2nd edition, 1997.
9. D. Hearn, M. Pauline Baker, and W. R. Carithers. Computer Graphics with Open GL. Pearson
Education Limited, Edinburgh Gate, Harlow, Essex CM20 2JE, 4th edition, 2014.
10. M. S. Iraji, A. Mazandarami, and H. Motameni. An efficient line clipping algorithm based on
Cohen-Sutherland line clipping algorithm. American Journal of Scientific Research, 14:65–71,
2011.
11. S. Kaijian, J. A. Edwards, and D. C. Cooper. An efficient line clipping algorithm. Comput.
Graph., 14(2):297–301, 1990.
13
14. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
12. S. R. Kodituwakku, K. R. Wijeweera, and M. A. P. Chamikara. An efficient line clipping
algorithm for 3D space. International Journal of Advanced Research in Computer Science and
Software Engineering, 2(5):96–101, 2012.
13. S. R. Kodituwakku, K. R. Wijeweera, and M. A. P. Chamikara. An efficient algorithm for line
clipping in computer graphics programming. Ceylon Journal of Science (Physical Sciences),
1(17):1–7, 2013.
14. Prastut Kumar, Fenil Patel, and Rajesh Kanna. An efficient line clipping algorithm for circular
windows using vector calculus and parallelization. International Journal of Computer Graphics
& Animation (IJCGA), 8(1/2):1–8, 2018.
15. Y-D. Liang and B. A. Barsky. A new concept and method for line clipping. tog, 3(1):1–22,
1984.
16. G. Lu, X. Wu, and Q. Peng. An efficient line clipping algorithm based on adaptive line
rejection. Computers and Graphics, 26:409–415, 2002.
17. D. Matthes and V. Drakopoulos. A simple and fast line-clipping method as a scratch extension
for computer graphics education. Computer Science and Information Technology, 7(2):40–47,
2019.
18. Tina M. Nicholl, D.T. Lee, and Robin A. Nicholl. An effective new algorithm for 2-D line
clipping: Its development and analysis. Comput. Graph., 21(4):253–262, 1987.
19. Nisha. Comparison of various line clipping algorithms: Review. International Journal of
Advanced Research in Computer Science and Software Engineering, 7(1):68–71, 2017.
20. Nisha. A review: Comparison of line clipping algorithms in 3D space. International Journal
of Advanced Research, 5(1):2377–2379, 2017.
21. A. Pandey and S. Jain. Comparison of various line clipping algorithms for improvement.
International Journal of Modern Engineering Research, 3(1):69–74, 2013.
22. B. K. Ray. An alternative algorithm for line clipping. Journal of Graphic Tools, 16(1):12–24,
2012.
23. B. K. Ray. A line segment clipping algorithm in 2D. International Journal of Computer
Graphics, 3(2):51–76, 2012.
24. N. C. Sharma and S. Manohar. Line clipping revisited: Two efficient algorithms based on
simple geometric observations. Comput. Graph., 16(1):51–54, 1992.
25. V. Skala. An efficient algorithm for line clipping by convex polygon. Comput. Graph.,
17(4):417–421, 1993.
26. V. Skala. O(lg N) line clipping algorithm in E2
. Comput. Graph., 18(4):517–524, 1994.
27. V. Skala. A new approach to line and line segment clipping in homogeneous coordinates.
Visual Comput., 21:905–914, 2005.
28. Mel Slater and Brian A. Barsky. 2d line and polygon clipping based on space subdivision.
Visual Comput., 10:407–422, 1994.
29. M. S. Sobkow, P. Pospisil, and Y. Yang. A fast two-dimensional line clipping algorithm via
line encoding. Comput. Graph., 11(4):459–467, 1987.
Authors
Vasileios Drakopoulos received a B.S. degree in Mathematics, an M.S. degree in
Informatics & Operations Research and a doctorate in Informatics and Computer
Science from the National and Kapodistrian University of Athens, in 1990, 1992 and
1999, respectively. He began studying dynamic systems and fractals during his grad-
uate studies and received a scholarship from the Bodossaki Foundation as financial
support for doctorate studies. After completing his Ph.D., he received a Postdoc-
toral Scholarship from the (Greek) State Scholarships Foundation (I.K.Y) and has
14
15. International Journal of Computer Graphics & Animation (IJCGA) Vol.9, No.4, July 2019
worked on parallel visualisation methods. He has taught a number of courses in
Tertiary as well as in Secondary Education. Currently, he is an Assistant Profes-
sor in the Department of Computer Science and Biomedical Informatics at the
University of Thessaly and a Research Fellow in the Department of Informatics &
Telecommunications at the National and Kapodistrian University of Athens. His
scientific area of interests include Fractal and Computational Geometry, Computer
Graphics, Dynamic Systems, Computational Complex Analysis, Image Processing
and Compression, Human-Computer Interaction as well as Didactics of Informat-
ics, Computer Science and ICT.
Dimitrios I. Matthes graduated from the Department of Computer Systems, TEI
of Piraeus in 2002 and obtained an M.S. diploma entitled “Information Technology
with Management” in 2009. He has worked in many IT companies from 2002 until
2005. From 2005 onwards he works as a teacher of Informatics in secondary educa-
tion. He has also worked as a part time teacher in several universities and institutes.
Currently, he is pursuing his Ph.D. degree in Computer Science and Biomedical In-
formatics from the University of Thessaly. His research interests include Computer
Graphics, Computational Geometry and ICT.
15