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

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