Home > Archive > Fortran > June 2005 > Fortran Code or Algorithm for Polygon Clipping ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Fortran Code or Algorithm for Polygon Clipping ?
|
|
| Klemens Barfus 2005-06-02, 3:58 pm |
| Dear list members,
is there some code in Fortran available for the clipping of convex
polygons ? Or do you know a description for an algorithm to cope with
this task ?
Thanks for your help in advance !
Klemens
| |
|
| Hi, I implemented the two algorithms that come in the book of Cormen. I
think it works fine. You can find the description in "Algorithms" of
Cormen. If you need the code, write me to send it to you. Just a
comment, comments are in Spanish :) .
FJRA
email: a19980403 @ pucp . edu . pe
| |
|
| Klemens Barfus <klemens.barfus@forst.tu-dresden.de> wrote:
> is there some code in Fortran available for the clipping of convex
> polygons ? Or do you know a description for an algorithm to cope with
> this task ?
I translated the Java code at
http://skyview.gsfc.nasa.gov/polysamp.html
to fortran 90. This code uses a Sutherland-Hodgman clipping alogrithm
to resample gridded data. It only works for convex polygons.
Check out the web page (the powerpoint presentation on the page
describes it in detail). If this is what you want, email me (see
signature for details) and I will send you the code.
I have found it to be very useful for regridding, rotating and otherwise
transforming gridded data.
Cheerio
Aidan
--
Remove famous (dead) Italian author plus full-stop to send me email (don't
blame me about the spelling of Alighieri -- it is the sy min's fault!)
|
|
|
|
|