[PD] Ray casting

patrice colet colet.patrice at free.fr
Thu Apr 20 12:53:31 CEST 2017


  If it's about mouse binding in [gemwin], the math is really heavy, 
particulary if the camera is moving.

  It can be solved differently by rendering the polygons in an hidden 
frame or another gemwin, and set a different color for each new polygon, 
the binding will be about detecting color under mouse cursor with the 
help of [pix_snap] and [pix_data] and it will work even if the camera is 
moving.


Le 20/04/2017 à 12:26, baptiste chatel a écrit :
> I think so for point in polygon, see attached. It's an old attempt of 
> mine, with a mechanism to draw polygons in Gem and then tell in which 
> polygon your mouse pointer is.
>
> 2017-04-20 9:13 GMT+02:00 Max <abonnements at revolwear.com 
> <mailto:abonnements at revolwear.com>>:
>
>     Did someone here solve this in Pd before?
>
>     https://en.wikipedia.org/wiki/Point_in_polygon
>     <https://en.wikipedia.org/wiki/Point_in_polygon>
>     https://rosettacode.org/wiki/Ray-casting_algorithm
>     <https://rosettacode.org/wiki/Ray-casting_algorithm>
>
>     _______________________________________________
>     Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at> mailing list
>     UNSUBSCRIBE and account-management ->
>     https://lists.puredata.info/listinfo/pd-list
>     <https://lists.puredata.info/listinfo/pd-list>
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list