gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #13658] Work on concave polygons too


From: Sachin Kumar Singh
Subject: [task #13658] Work on concave polygons too
Date: Tue, 17 Mar 2020 08:45:07 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Follow-up Comment #16, task #13658 (project gnuastro):

I've tried many points around the problematic region in my
`gal_concavesort_isinside_polygon' but there doesn't seem to be any problem at
all. But when reproducing the steps I see that the erroneous region still
appears. I even applied a rounding error constant as used in `polygon.c`, but
the error still persists. I tried a few other points and then there seemed a
pattern. 

Firstly, the erroneous region is detached from the main polygon(in ds9 it
shows a blank pixel value at the apparent joining). I think it is independent
of the main polygon.

If the point is outside(as shown in the figure) the intersection of the 2
points is also considered for the cropping region.

Hence I think the problem arises while performing the actual clipping because,
during a convex polygon clipping, no extra region is clipped but during a
concave clipping errors might arise(if using Sutherland–Hodgman algorithm
<https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm>).

Which algorithm is used in onecrop.c to clip polygons? How to fix if it used a
more general clipping algorithm because `gal_concavesort_isinside_polygon' is
tested is not showing any problems?



(file #48612, file #48613)
    _______________________________________________________

Additional Item Attachment:

File name: Screenshot from 2020-03-16 23-08-03.png Size:478 KB
    <https://savannah.gnu.org/file/Screenshot from 2020-03-16
23-08-03.png?file_id=48612>

File name: Screenshot from 2020-03-17 00-07-19.png Size:403 KB
    <https://savannah.gnu.org/file/Screenshot from 2020-03-17
00-07-19.png?file_id=48613>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?13658>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]