Skip to content

This program implements convex hull for a set of coordinates using Graham's Scan algorithm.

Notifications You must be signed in to change notification settings

yxu1183/Convex-Hull

Repository files navigation

Convex-Hull

Algorithm and Data Structures/Honors Project: Created by Dr. Alxendra Stefan

Description

This program implements Graham's scan for convex hall of a set of points. Given a set of points-Q, the convex hall of Q is a polygon 'P' such that any point from Q is either on P or inside it.

Functionality

Implementation

Convex hull implementation using excel sheet:

Compilation Instructions

The application is built in an omega server at UTA.

To generate the random coordinate points with size of 100 and of range(0 - 1000), in terminal:

gcc -o rand random.c
rand 100 1000

To compute the convex hall by reading in the from the file random.txt, in terminal:

gcc convex_hull_graham_scan.c
./a.out < random.txt

To compute the convex hall by redirection of input from the keyboard, in terminal:

gcc convex_hull_graham_scan.c
./a.out

To check for memory leaks and error, in terminal:

gcc convex_hull_graham_scan.c
valgrind --leak-check=full ./a.out < random.txt

Author

Yunika Upadhayaya - Student ID: 1001631183

About

This program implements convex hull for a set of coordinates using Graham's Scan algorithm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages