Coder Social home page Coder Social logo

milasudril / convexhull-3d-implementation-of-incremental-convexhull-algorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dung-han-lee/convexhull-3d-implementation-of-incremental-convexhull-algorithm

0.0 1.0 0.0 175 KB

c++ implementation of 3D incremental convell hull algorthim

License: Other

C++ 96.18% Makefile 3.82%

convexhull-3d-implementation-of-incremental-convexhull-algorithm's Introduction

Incremental 3D-Convexhull algorithm

This repository contains an C++ implementation of 3D ConvexHull algorithm from the book Computational Geometry in C by O'Rourke. This code is written using standard containers, together with GeoSIMD. The latter is used to store points.

Example video

Build and Run (text output only)

make
__targets_rel/src/convhull < data/bunny.obj > bunny_convhull.obj

Example Usage

// points can be converted into a
//
// span<convhull::point_3d const>;

convhull::builder builder{points};

std::ranges::for_each(points, [](auto const& item){
	printf("v %.8g %.8g %.8g\n", item[0], item[1], item[2]);
});

std::ranges::for_each(builder.faces(), [](auto const& item) {
	printf("f %u %u %u\n",
		item.vertices[0].value() + 1,
		item.vertices[1].value() + 1,
		item.vertices[2].value() + 1);
});

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.