[Top][All Lists]

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

[task #15578] Function to find if polygon vertices are sorted anti-clock

From: Sachin Kumar Singh
Subject: [task #15578] Function to find if polygon vertices are sorted anti-clockwise
Date: Wed, 25 Mar 2020 10:22:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Follow-up Comment #8, task #15578 (project gnuastro):

If I need to use `gal_permutation_apply`, I need to use `gal_data_t` as input.
Should I use 

temp=gal_data_alloc(v,  GAL_TYPE_FLOAT64, n, NULL, NULL, 0, minmapsize, 0,

to make `temp` a temporary store the vertices `v` to be reversed. What should
be the value of minmapsize and is this the correct way to convert `double*` to
`gal_data_t*`? I plan to make a `permutation` array having the reverse indexes
than the clockwise vertices and then using `gal_permutation_apply(temp, n)` to
reverse that order. 

I also thought of swapping the vertices using a swap function but it seems to
be an overkill given that the permutation feature already exists. 


Reply to this item at:


  Message sent via Savannah

reply via email to

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