delaunay.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #include <neatogen/sparsegraph.h>
  12. typedef struct {
  13. int nedges; /* no. of edges in triangulation */
  14. int* edges; /* 2*nsegs indices of points */
  15. int nfaces; /* no. of faces in triangulation */
  16. int* faces; /* 3*nfaces indices of points */
  17. int* neigh; /* 3*nfaces indices of neighbor triangles */
  18. } surface_t;
  19. int *delaunay_tri (double *x, double *y, int n, int* nedges);
  20. int *get_triangles (double *x, int n, int* ntris);
  21. v_data *UG_graph(double *x, double *y, int n);
  22. surface_t* mkSurface (double *x, double *y, int n, int* segs, int nsegs);
  23. void freeSurface (surface_t* s);