[Scilab-users] ?= creating ROI from mouse click

Samuel Gougeon sgougeon at free.fr
Sat Mar 12 01:02:21 CET 2016


Le 12/03/2016 00:42, Samuel Gougeon a écrit :
> .../...
>
> This ends the selection part.
>
> After that, identifying points of your grayplot area being in the 
> curve may be done with
> point_in_polygon: https://fileexchange.scilab.org/toolboxes/121000
> However, this script is not vectorized. So, if your full area has big 
> sizes, it may takes a while.
>
> I would not guaranty that point_in_polygon() can be vectorized, but we 
> may try to.
> It does not look too bad, at first sight :)
>
.
Actually, its vectorization is straightforward (to process a matrix of 
points without explicit "for" loop,
instead of a unique point). But the script has other problems.
Special cases (horizontal segments, points on segments, etc) are not 
really handled.
Nevertheless, you may give it a try as is. Or improve it for special cases.

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160312/b4afa81a/attachment.htm>


More information about the users mailing list