C++ Program to Find the Convex Hull using Jarvis March

This is a C++ Program to implement Jarvis March to find convex hull. The idea of Jarvis’s Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counterclockwise direction. Here is source code of the C++ Program to Implement Jarvis March to Find … Read more

advertisement

C++ Program to Find the Convex Hull using Graham Scan Algorithm

This is a C++ Program to implement Graham Scan algorithm. Graham’s scan is a method of computing the convex hull of a finite set of points in the plane with time complexity O(n log n). Here is source code of the C++ Program to Implement Graham Scan Algorithm to Find the Convex Hull. The C++ … Read more

advertisement

C++ Program to Find if a Point Lies Inside or Outside a Circle

This is a C++ Program to Check if a Point d lies Inside or Outside a Circle Defined by Points a, b, c in a Plane. For any point t (xt, yt) on the plane, its position with respect to the circle defined by 3 points (x1, y1) , (x2, y2), (x3, y3). s = … Read more

advertisement

C++ Program to Use Above Below Primitive to Test Whether Two Lines Intersect

This is a C++ Program to check whether two lines intersect to each other. The above-below primitive can be used to test whether a line intersects a line segment. It does iff one endpoint of the segment is to the left of the line and the other is to the right. Segment intersection is similar … Read more

advertisement

C++ Program to Implement Gift Wrapping Algorithm in Two Dimensions

This is a C++ Program to implement Gift Wrapping algorithm to find convex hull in two dimensional space. In computational geometry, the gift wrapping algorithm is an algorithm for computing the convex hull of a given set of points. In the two-dimensional case the algorithm is also known as Jarvis march, after R. A. Jarvis, … Read more

advertisement

C++ Program to Find the Area of a Triangle Using Determinants

This is a C++ program to find the area of triangle using determinants. Formula for the area of a triangle using determinants x1 y1 1 Area=±1/2 x2 y2 1 x3 y3 1 The plus/minus in this case is meant to take whichever sign is needed so the answer is positive (non-negative). Do not say the … Read more

advertisement

C++ Program to Implement First Fit Decreasing for 1-D Objects and M Bins

This is a C++ Program to implement First Fit Decreasing for one dimensional objects and M bins. In simple terms this is bin packing algorithm for first fit technique. Here is source code of the C++ Program to Implement First Fit Decreasing for 1-D Objects and M Bins. The C++ program is successfully compiled and … Read more

advertisement

C++ Program to Show the Duality Transformation of Line and Point

This is a C++ program to show the duality transformation of line and point. The transformation corresponds from line to point and point to line. Here is source code of the C++ Program to Show the Duality Transformation of Line and Point. The C++ program is successfully compiled and run on a Linux system. The … Read more

advertisement

C++ Program to Compute Cross Product of Two Vectors

This is a C++ Program to find the cross product of two vectors. In mathematics, the cross product or vector product is a binary operation on two vectors in three-dimensional space. It results in a vector that is perpendicular to both and therefore normal to the plane containing them. Here is source code of the … Read more

advertisement

C++ Program to Find the Volume of a Tetrahedron Using Determinants

This is a C++ Program to find the volume of tetrahedron. Call the four vertices of the tetrahedron (a, b, c), (d, e, f), (g, h, i), and (p, q, r). Now create a 4-by-4 matrix in which the coordinate triples form the colums of the matrix, with a row of 1’s appended at the … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.