Calculates the convex hull of a given set of points.

Overview

Calculates the convex hull of a given set of points. Monotone chain is used as algorithm.

Info

Given a set of points, the convex hull is a subset of points which form a polygon that encloses all points. The implemented algorithm is Andrew's monotone chain algorithm, which has an efficient O(n log n) runtime.

(Maonus, [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons)

Usage

The library consists of the convexHull function, which takes a generic list of objects and accessor function for the x and y coordinates, and returns the objects forming a convex hull.

import 'package:vector_math/vector_math_64.dart';
import 'package:convex_hull/convex_hull.dart';

// you can use an iterable of any object. Here,
// Vector2 is used.
const points = <Vector2>[
    Vector2(1, 2),
    Vector2(3.2, 1),
    Vector2(1.3, 1),
]
// specify what should be considered as the x and y coordinate
List<Vector2> hull = convexHull<Vector2>(points, x: (e) => e.x, y: (e) => e.y);
You might also like...

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.

English | 简体中文 The official BottomAppBar can only display a notch FAB with an app bar, and sometimes we need a convex FAB. BottomAppBar and NotchShape

Dec 28, 2022

his package provides a Clock class which encapsulates the notion of the "current time" and provides easy access to points relative to the current time.

This package provides a Clock class which encapsulates the notion of the "current time" and provides easy access to points relative to the current tim

Dec 15, 2022

Flutter plugin to display a simple flat world map with animated points in real time

Flutter plugin to display a simple flat world map with animated points in real time

Flutter Simple Map Flutter plugin to display a simple flat world map with animated points in real time. Can be used as a presentation of online users,

Dec 8, 2022

An Android/iOS app that calculates tips/splits

tipsy An Android/iOS App that calculates Tips/Splits. Getting Started This project is a starting point for a Flutter application. A few resources to g

Dec 4, 2021

Android/ios mobile application which calculates BMI.

Android/ios mobile application which calculates BMI.

bmi_calculator A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

Aug 17, 2022

Application that calculates the calorie needs of a person.

calories_app It is an application that calculates a person's calorie requirement. Getting Started This project is a starting point for a Flutter appli

Oct 12, 2022

This is a simple mobile application which calculates the person expenses during each week and tracks up where he spend his money!

This is a simple mobile application which calculates the person expenses during each week and tracks up where he spend his money!

Presonal Expenses Tracker Table of content About the project built with Getting Started installation Running ScreenShots About This is a simple mobile

Nov 3, 2022

A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

Dec 16, 2022

Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainder to the task, set color to separate tasks and it allows to add URL with URL's informations.

Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainder to the task, set color to separate tasks and it allows to add URL with URL's informations.

Utility Manager Flutter Application! Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainde

Jan 6, 2022

A Flutter package which provides helper widgets for selecting single or multiple account/user from the given list.

A Flutter package which provides helper widgets for selecting single or multiple account/user from the given list.

account_selector A Flutter package which provides helper widgets for selecting single or multiple account/user from a list Supported Dart Versions Dar

Oct 7, 2021

A simple, unofficial AWS Polly client in dart. Supports generating a URL given an input text and voice identifier.

Flutter AWS Polly Plugin This plugin is a Flutter wrapper for AWS Polly which is a cloud service that converts text into lifelike speech. Getting Star

Aug 20, 2022

Localizator is a flutter application that provides your current/given position,and gives you weather Forecasts

Localizator is a flutter application that provides your current/given position,and gives you weather Forecasts

Locativity Locativity is a flutter application implements flutter_map and Geolocator plugins to provide your current/given position then render it on

Nov 6, 2022

A chat-like app that allows students to exchange chargers given port type and the room it is currently located in.

charger_connect A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Dec 22, 2021

Flutter package to determine whether to prompt a user to rate your app based on a given criteria.

should_review This package helps determine if a user should be prompted to rate your app. The behavior of this package was inspired by the stackoverfl

Sep 10, 2022

A flutter plugin to draw the coordinates on the widget and as well as to find the given point is inside a list of coordinates or not.

A flutter plugin to draw the coordinates on the widget and as well as to find the given point is inside a list of coordinates or not.

Draw On A flutter plugin to draw the coordinates on widget and as well as to find the given point is inside a list of coordinates or not. For Draw on

Apr 5, 2022

flutter web app with given code and example. Step by step teaching how to build a flutter web app with backend

flutter_web A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Oct 26, 2022

Dart API that provides sunset and sunrise times for a given latitude and longitude

Sunrise Sunset Dart API that provides sunset and sunrise times for a given latit

Dec 24, 2021

Flutter-sorted-chips-row - Flutter library for rendering a row of Material "Chip" buttons that gets sorted according to the given function

Flutter-sorted-chips-row - Flutter library for rendering a row of Material

sorted_chips_row A Flutter Widget displaying a row of Material Chips, sorted according to the provided comparison function. How to use Adding dependen

Jul 29, 2021
Owner
Daniel
Daniel
A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

A Flutter ListView that implicitly calculates the changes between two lists using the MyersDiff algorithm and animates between them for you

Vojtech Pavlovsky 2 Dec 16, 2022
Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainder to the task, set color to separate tasks and it allows to add URL with URL's informations.

Utility Manager Flutter Application! Utility Manager Flutter Application is made with Flutter and Supabase which allows user to add task, set remainde

Kathirvel Chandrasekaran 6 Jan 6, 2022
A chat-like app that allows students to exchange chargers given port type and the room it is currently located in.

charger_connect A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Lani 2 Dec 22, 2021
Flutter package to determine whether to prompt a user to rate your app based on a given criteria.

should_review This package helps determine if a user should be prompted to rate your app. The behavior of this package was inspired by the stackoverfl

Francis Ilechukwu 4 Sep 10, 2022
Plant-Disease-Detector - A Flutter app that detects a plant's disease given a photo of an affected part of the plant

Plant Disease Detector A Flutter app that detects a plant's disease given a phot

suis458 5 Dec 14, 2022
A set of real world timelines to showcase the use of timeline_tile package, built with Flutter.

beatiful_timelines Beautiful timelines built with Flutter and timeline_tile. Current examples: Timeline Showcase Football Timeline Activity Timeline S

null 233 Dec 21, 2022
Windows95 UI components for Flutter apps. Bring back the nostalgic look and feel of old operating systems with this set of UI components ready to use.

Flutter95 Windows95 UI components for Flutter apps. UNDER CONSTRUCTION Screenshots Components Scaffold95 Scaffold as a Windows95 styled window. Provid

Miguel Beltran 141 Jan 2, 2023
A set of commands for coverage tracefiles manipulation.

Coverage Utils A set of commands for coverage info files manipulation. Installing $ dart pub global activate --source git https://github.com/mrverdant

Karlo Verde 22 Oct 9, 2022
how to set up for run the application on desktop

e_learning_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started i

FlutterDevs 11 Nov 1, 2022