Giter Club home page Giter Club logo

poly2tri-c's Introduction

========================================================================
====  Poly2Tri-C: A library for generating, refining and rendering  ====
====        2-Dimensional Constrained Delaunay Triangulations       ====
========================================================================

Quick Start
~~~~~~~~~~~
In order to compile the library, you need the GLib development files.
Then simply run ./configure, make and make install. More detailed
instructions can be found in the INSTALL file.

Direct Usage
~~~~~~~~~~~~
In order to specify the outline points, create a file with the following
format:

P pt1_x pt1_y
P pt2_x pt2_y
P pt3_x pt3_y
...

To specify a hole, start the line with H instead of P. All the points
from that line and onward will belong to a hole. Each line begining with
H will create a new hole. To specify a steiner point, start the line
with S.

A simple invocation would look like this:

    p2tc -i mypoints.pts -o mymesh -s -m [-r N]

Explanation:

  -i Specifies the input file
  -o Specifies the base name for output files
  -s Would create an SVG output of the fine mesh as mymesh.svg
  -m Would create a PPM (raster) output of the fine mesh as mymesh.ppm
  -r N Specifies that at most N points shold be inserted to the mesh in
       the refinement step. Invocation without this argument lets the
       algorithm run until it converges.

API Usage
~~~~~~~~~
The source code for the p2tc program is shipped inside the bin/
directory. It should get you started very fast.

Limitations
~~~~~~~~~~~
Like all software, this library has some limitations:

 - There nustn't be any repetitions of points (it also means that the
   first point shouldn't be repeated at the end of the file)
 - The outline mustn't be self-intersecting
 - All holes must lie inside the main outline and must not intersect in
   pairs
 - Nearly no input validation is done in order to speed up the
   computation. This means you may get strange crashes on incorrect
   usage. The most common such crashes are when specifying an input
   outline or hole with either the last point repeating the first, or
   with less than 3 input points.

poly2tri-c's People

Contributors

lightningismyname avatar michaelmure avatar fumin avatar

Watchers

ade avatar

poly2tri-c's Issues

Error building on Windows

What steps will reproduce the problem?
1. Run ./configure
2. make
3. All warnings being treated as errors

What is the expected output? What do you see instead?
a built app. I see the following:
sweep.c: In function 'p2t_sweep_next_flip_point':
sweep.c:989:1: error: control reaches end of non-void function 
[-Werror=return-type]
cc1.exe: all warnings being treated as errors
make[4]: *** [sweep.lo] Error 1
make[4]: Leaving directory `/usr/src/gimp/limn/poly2tri-c/poly2tri-c/p2t/sweep'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/gimp/limn/poly2tri-c/poly2tri-c/p2t'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/gimp/limn/poly2tri-c/poly2tri-c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/gimp/limn/poly2tri-c'
make: *** [all] Error 2

What version of the product are you using? On what operating system?
git version. OS = Windows 7 64-bit but building 32-bit with mingw 32-bit gcc.

Please provide any additional information below.

$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\Win32\mingw32\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/win32/mingw32/bin/../libexec/gcc/i686-pc-mingw32/4.6.3/lt
o-wrapper.exe
Target: i686-pc-mingw32
Configured with: ../gcc-4.6.3/configure --build=i686-pc-mingw32 
--disable-multilib --disable-64bit --prefix=/mingw32 --with-sysroot=
/mingw32 --disable-shared --enable-static --disable-nls 
--enable-version-specific-runtime-libs --disable-win32-registry --without-dw
arf2 --enable-sjlj-exceptions --enable-fully-dynamic-string 
--enable-languages=c,ada,lto,c++,objc,obj-c++,fortran --enable-libgomp -
-enable-lto --enable-libssp --enable-gnattools --disable-bootstrap --with-gcc 
--with-gnu-as --with-gnu-ld --with-stabs --enable-inte
rwork --with-mpfr-include=/home/beta/gcc-build/../gcc-4.6.3/mpfr/src 
--with-mpfr-lib=/home/beta/gcc-build/mpfr/src/.libs
Thread model: win32
gcc version 4.6.3 (GCC)

Original issue reported on code.google.com by [email protected] on 20 Jul 2012 at 1:34

can't build from sources

What steps will reproduce the problem?
1. $ git clone https://code.google.com/p/poly2tri-c/
2. $ cd poly2tri-c/
3. $ ./autogen.sh
4. $ ./configure 
5. $ make

What is the expected output? What do you see instead?
make  all-recursive
make[1]: Entering directory `/tmp/test/poly2tri-c'
Making all in poly2tri-c
make[2]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c'
Making all in p2t
make[3]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c/p2t'
Making all in sweep
make[4]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c/p2t/sweep'
  CC       advancing_front.lo
  CC       cdt.lo
  CC       sweep.lo
  CC       sweep_context.lo
  CCLD     libp2tc-sweep.la
make[4]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c/p2t/sweep'
Making all in common
make[4]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c/p2t/common'
  CC       shapes.lo
  CC       utils.lo
  CCLD     libp2tc-common.la
make[4]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c/p2t/common'
make[4]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c/p2t'
  CCLD     libp2tc.la
make[4]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c/p2t'
make[3]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c/p2t'
Making all in refine
make[3]: Entering directory `/tmp/test/poly2tri-c/poly2tri-c/refine'
  CC       bounded-line.lo
make[3]: *** No rule to make target `cdt.c', needed by `cdt.lo'.  Stop.
make[3]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c/refine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/test/poly2tri-c/poly2tri-c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/test/poly2tri-c'
make: *** [all] Error 2

What version of the product are you using? On what operating system?
the latest commit is 5ac75d6f09e4de35ef33289c69bc1d46c2a04970
GNU/Linux, Fedora 19, x86_64.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 18 Dec 2014 at 12:03

Building on Mac OS X

What steps will reproduce the problem?
1. try to ./configure

What is the expected output? What do you see instead?
In that first step I have aan error : 
./configure: line 12362: syntax error near unexpected token `GLIB,'
./configure: line 12362: `PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28)'

What version of the product are you using? On what operating system?
SVN download, Mac Os X 10.8

Please provide any additional information below.
Is there a way to indicate where is glib ?

Original issue reported on code.google.com by [email protected] on 28 Feb 2013 at 1:20

Changing autogen.sh and Makefile.am

Please be sure to make autogen.sh executable (minor inconvenience), but please 
modify Makefile.am (major inconvenience):

ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} <- so that macros in non-standard 
locations can be found.


Original issue reported on code.google.com by [email protected] on 20 Jul 2012 at 1:57

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.