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