(1) In pnpoly() your $c seems to use bad value
stuff but does not have badflag set as far as
I can tell.

(2) Your pnpoly() routine is not calculating the
area of the polygon so I'm not sure I understand
why it should give the same result as the
determinant calculation.

(3) I suggest debugging this type of problem
in the pdl2 or perldl shell.

One can cut and paste the problem code a
line at a time into the interactive shell and
check that the values and algorithm are doing
what you expect/desire.  Making the $c variable
"bad" in the pdl2 shell we see:

  pdl> $real_area = polygon_area(@xy);
  pdl> print "real area: $real_area\n";
  real area: 807.5
  pdl> p $c->ngood
  805 

Cheers,
Chris

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to