Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks

by salva (Canon)
on Jul 02, 2008 at 21:29 UTC ( [id://695204]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Math::Trig qw(pi);
    $angle = atan2($v2->{y}, $v2->{x}) - atan2($v1->{y}, $v1->{x});
    # and normalize the angle to be in the range [-pi, pi]
    my $rounds = floor(($angle + pi) / (2 * pi));
    $angle -= 2 * pi * $rounds;
    
  2. or download this
    
    my %polygon = map { $_ => 1 } @polygon, @polygon_holes;
    @edges = grep { !$polygon{$_} } @edges
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://695204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found