Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

reordering segments to form a polygon

by dada (Chaplain)
on Aug 13, 2004 at 09:15 UTC ( [id://382584]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
       |
     5 +  F-----------E
    ...
       |
       +--+--+--+--+--+--
          1  2  3  4  5
    
  2. or download this
    DE = [ 5, 3, 5, 5 ]
    AB = [ 1, 1, 2, 1 ]
    ...
    EF = [ 5, 5, 1, 5 ]
    FA = [ 1, 5, 1, 1 ]
    CD = [ 2, 3, 5, 3 ]
    
  3. or download this
    AB = [ 1, 1, 2, 1 ]
    BC = [ 2, 1, 2, 3 ]
    ...
    DE = [ 5, 3, 5, 5 ]
    EF = [ 5, 5, 1, 5 ]
    FA = [ 1, 5, 1, 1 ]
    
  4. or download this
    A = [ 1, 1 ]
    B = [ 2, 1 ]
    ...
    D = [ 5, 3 ]
    E = [ 5, 5 ]
    F = [ 1, 5 ]
    
  5. or download this
      # segments are in @seg
      my($start_x, $start_y) = ($seg[0]->[0], $seg[0]->[1]);
    ...
        }
      }
      # polygon points are in @poly
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://382584]
Approved by Corion
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-29 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found