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: Wed, 18 Mar 2020 03:06:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

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

Two new functions are added in `polygon.c' and pushed to `task-is-in-polygon'
branch :
[https://github.com/sachinkumarsingh092/gnuastro/tree/task-is-in-polygon] 

Also, I figured out the problem with the extra point and fixed it manually,
but need to implement it as a general solution. The problem is that my
function need n+1 points(the last edge from v[n-1] to v[0] is also required).
We can do this by checking the type of polygon. If it is concave, we need to
`realloc(ipolygon, 2*(nvertices+1)*sizeof *ipolygon)` the `ipolygon` to insert
2 more points(the first points) and similarly ordinds. But while doing so,
error arise:
` ignoring return value of ‘realloc’, declared with attribute
warn_unused_result`.

How to implement my function so that it can use the n+1 points?



    _______________________________________________________

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]