Changeset 2560
 Timestamp:
 Mar 20, 2006, 7:10:56 PM (18 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

documentation/user_manual/anuga_user_manual.tex
r2559 r2560 1480 1480 \section{utilities/polygons} Could do now. 1481 1481 1482 \begin{itemize} 1483 \item \indexedcode{polygon_function} 1484 \item \indexedcode{read_polygon} 1485 \item \indexedcode{populate_polygon} 1486 \item \indexedcode{point_in_polygon} 1487 \item \indexedcode{inside_polygon} 1488 \item \indexedcode{outside_polygon} 1489 \item \indexedcode{point_on_line} 1490 \item \indexedcode{separate_points_by_polygon} 1491 \end{itemize} 1482 \begin{classdesc}{Polygon_function}{regions, default = 0.0, geo_reference = None} 1483 Module: \code{utilities.polygon} 1484 1485 1486 \end{classdesc} 1487 1488 \begin{funcdesc}{read_polygon}{filename} 1489 Module: \code{utilities.polygon} 1490 1491 Reads the specified file and returns a polygon. Each 1492 line of the file must contain exactly two numbers, separated by a comma, which are interpreted 1493 as coordinates of one vertex of the polygon. 1494 \end{funcdesc} 1495 1496 \begin{funcdesc}{populate_polygon}{polygon, number_of_points, seed = None, exclude = None} 1497 \indexedcode{populate_polygon} 1498 Module: \code{utilities.polygon} 1499 1500 Populates the interior of the specified polygon with the specified number of points, 1501 selected by means of a uniform distribution function. 1502 \end{funcdesc} 1503 1504 \begin{funcdesc}{point_in_polygon}{polygon, delta=1e8} 1505 \indexedcode{point_in_polygon} 1506 Module: \code{utilities.polygon} 1507 1508 Returns a point inside the specified polygon and close to the edge. The distance between 1509 the returned point and the nearest point of the polygon is less than $\sqrt{2}$ times the 1510 second argument \code{delta}, which is taken as $10^{8}$ by default. 1511 \end{funcdesc} 1512 1513 \begin{funcdesc}{inside_polygon}{points, polygon, closed = True, verbose = False} 1514 \indexedcode{inside_polygon} 1515 Module: \code{utilities.polygon} 1516 1517 Used to test whether a single pointor the members of a list of points 1518 are inside the specified polygon. If the first argument is a single point, 1519 returns \code{True} if the point is inside the polygon, or \code{False} 1520 otherwise. If the first argument is a list of points, returns a Numeric 1521 array comprising the indices of the points in the list that lie inside the polygon. 1522 (If none of the points are inside, returns \code{zeros((0,), 'l')}.) 1523 Points on the edges of the polygon are regarded as inside if 1524 \code{closed} is set to \code{True} or omitted; otherwise they are regarded as outside. 1525 \end{funcdesc} 1526 1527 \begin{funcdesc}{outside_polygon}{points, polygon, closed = True, verbose = False} 1528 \indexedcode{outside_polygon} 1529 Module: \code{utilities.polygon} 1530 1531 Exactly like \code{inside_polygon}, but with the words `inside' and `outside' interchanged. 1532 \end{funcdesc} 1533 1534 \begin{funcdesc}{point_on_line}{x, y, x0, y0, x1, y1} 1535 Module: \code{utilities.polygon} 1536 1537 Returns \code{True} or \code{False}, depending on whether the point with coordinates 1538 \code{x, y} is on the line passing through the points with coordinates \code{x0, y0} 1539 and \code{x1, y1} (extended if necessary at either end). 1540 \end{funcdesc} 1541 1542 \begin{funcdesc}{separate_points_by_polygon}{points, polygon, 1543 closed = True, verbose = False}\indexedcode{separate_points_by_polygon} 1544 Module: \code{utilities.polygon} 1545 1546 \end{funcdesc} 1547 1548 1492 1549 1493 1550 \section{coordinate_transforms}
Note: See TracChangeset
for help on using the changeset viewer.