GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::Geometry::Planar::Offset(3) User Contributed Perl Documentation Math::Geometry::Planar::Offset(3)

Math::Geometry::Planar::Offset - Calculate offset polygons

  use Math::Geometry::Planar::Offset;

  my (@results) = OffsetPolygon(\@points, $distance);
  foreach my $polygon (@results) {
    # do something with @$polygon
  }

Eric Wilhelm @ <ewilhelm at cpan dot org>

Copyright (C) 2003-2007 Eric L. Wilhelm. All rights reserved.

Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, neither Eric Wilhelm, nor anyone else, owes you anything whatseover. You have been warned.

Note that this includes NO GUARANTEE of MATHEMATICAL CORRECTNESS. If you are going to use this code in a production environment, it is YOUR RESPONSIBILITY to verify that the methods return the correct values.

You may use this software under one of the following licenses:

  (1) GNU General Public License 
    (found at http://www.gnu.org/copyleft/gpl.html) 
  (2) Artistic License 
    (found at http://www.perl.com/pub/language/misc/Artistic.html)

There are currently some problems with concurrent edge events on outward (and maybe inward) offsets. Some significant changes need to be made.

These methods are actually defined in Math::Geometry::Planar, which uses this module.

Returns reference to an array of polygons representing the original polygon offsetted by $distance

  $polygon->offset_polygon($distance);

Only OffsetPolygon is exported.

Returns the constant pi

Make offset polygon subroutine.

Call with offset distance and ref to array of points for original polygon polygon input must be pre-wrapped so point[n]=point[0]

Will return a list of polygons (as refs.) The number of polygons in the output depends on the shape of your input polygon. It may split into several pieces during the offset.

  my (@results) = OffsetPolygon(\@points, $distance);
  foreach my $polygon (@results) {
    # do something with @$polygon
  }
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.