For Programmers: Free Programming Magazines  


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
FJRA

2005-06-02, 3:58 pm

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

Aidan

2005-06-03, 3:57 am

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 symin's fault!)
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com