annotate toolboxes/graph_visualisation/share/man/man3/pathplan.3 @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 .TH LIBPATH 3 "01 APRIL 1997"
wolffd@0 2 .SH NAME
wolffd@0 3 \fBlibpathplan\fR \- finds and smooths shortest paths
wolffd@0 4 .SH SYNOPSIS
wolffd@0 5 .ta .75i 1.5i 2.25i 3i 3.75i 4.5i 5.25i 6i
wolffd@0 6 .PP
wolffd@0 7 .nf
wolffd@0 8 \f5
wolffd@0 9 #include <graphviz/pathplan.h>
wolffd@0 10
wolffd@0 11 typedef struct Pxy_t {
wolffd@0 12 double x, y;
wolffd@0 13 } Pxy_t;
wolffd@0 14
wolffd@0 15 typedef struct Pxy_t Ppoint_t;
wolffd@0 16 typedef struct Pxy_t Pvector_t;
wolffd@0 17
wolffd@0 18 typedef struct Ppoly_t {
wolffd@0 19 Ppoint_t *ps;
wolffd@0 20 int pn;
wolffd@0 21 } Ppoly_t;
wolffd@0 22
wolffd@0 23 typedef Ppoly_t Ppolyline_t;
wolffd@0 24
wolffd@0 25 typedef struct Pedge_t {
wolffd@0 26 Ppoint_t a, b;
wolffd@0 27 } Pedge_t;
wolffd@0 28
wolffd@0 29 typedef struct vconfig_s vconfig_t;
wolffd@0 30
wolffd@0 31 #define POLYID_NONE
wolffd@0 32 #define POLYID_UNKNOWN
wolffd@0 33
wolffd@0 34 \fP
wolffd@0 35 .fi
wolffd@0 36 .SH FUNCTIONS
wolffd@0 37
wolffd@0 38 .nf
wolffd@0 39 \f5
wolffd@0 40 int Pshortestpath(Ppoly_t *boundary, Ppoint_t endpoints[2], Ppolyline_t *output_route);
wolffd@0 41 \fP
wolffd@0 42 .fi
wolffd@0 43 Finds a shortest path between two points in a simple polygon.
wolffd@0 44 You pass endpoints interior to the polygon boundary.
wolffd@0 45 A shortest path connecting the points that remains in the polygon
wolffd@0 46 is returned in output_route. If either endpoint does not lie in
wolffd@0 47 the polygon, an error code is returned. (what code!!)
wolffd@0 48
wolffd@0 49 .nf
wolffd@0 50 \f5
wolffd@0 51 vconfig_t *Pobsopen(Ppoly_t **obstacles, int n_obstacles);
wolffd@0 52 .br
wolffd@0 53 int Pobspath(vconfig_t *config, Ppoint_t p0, int poly0, Ppoint_t p1, int poly1, Ppolyline_t *output_route);
wolffd@0 54 .br
wolffd@0 55 void Pobsclose(vconfig_t *config);
wolffd@0 56 \fP
wolffd@0 57 .fi
wolffd@0 58 These functions find a shortest path between two points in a
wolffd@0 59 simple polygon that possibly contains polygonal obstacles (holes).
wolffd@0 60 \f5Pobsopen\fP creates a configuration (an opaque struct of type
wolffd@0 61 \f5vconfig_t\fP) on a set of obstacles. \f5Pobspath\fP finds
wolffd@0 62 a shortest path between the endpoints that remains outside the
wolffd@0 63 obstacles. If the endpoints are known to lie inside obstacles,
wolffd@0 64 \f5poly0\fP or \f5poly1\fP should be set to the index in the
wolffd@0 65 \f5obstacles\fP array. If an endpoint is definitely not inside
wolffd@0 66 an obstacle, then \f5POLYID_NONE\fP should be passed. If the
wolffd@0 67 caller has not checked, then \f5POLYID_UNKNOWN\fP should be passed,
wolffd@0 68 and the path library will perform the test.
wolffd@0 69
wolffd@0 70 (!! there is no boundary polygon in this model?!!!)
wolffd@0 71
wolffd@0 72 .nf
wolffd@0 73 \f5
wolffd@0 74 int Proutespline (Pedge_t *barriers, int n_barriers, Ppolyline_t input_route, Pvector_t endpoint_slopes[2],
wolffd@0 75 Ppolyline_t *output_route);
wolffd@0 76 \fP
wolffd@0 77 .fi
wolffd@0 78
wolffd@0 79 This function fits a Bezier curve to a polyline path.
wolffd@0 80 The curve must avoid a set of barrier segments. The polyline
wolffd@0 81 is usually the \f5output_route\fP of one of the shortest path
wolffd@0 82 finders, but it can be any simple path that doesn't cross
wolffd@0 83 any obstacles. The input also includes endpoint slopes and
wolffd@0 84 0,0 means unconstrained slope.
wolffd@0 85
wolffd@0 86 Finally, this utility function converts an input list of polygons
wolffd@0 87 into an output list of barrier segments:
wolffd@0 88 .nf
wolffd@0 89 \f5
wolffd@0 90 int Ppolybarriers(Ppoly_t **polys, int n_polys, Pedge_t **barriers, int *n_barriers);
wolffd@0 91 \fP
wolffd@0 92 .fi
wolffd@0 93
wolffd@0 94 .SH AUTHORS
wolffd@0 95 David Dobkin (dpd@cs.princeton.edu),
wolffd@0 96 Eleftherios Koutsofios (ek@research.att.com),
wolffd@0 97 Emden Gansner (erg@research.att.com).