[postgis-users] sum dot product of outward normal vectors of polygon segments to given direction

Henri De Feraudy feraudyh at yahoo.com
Mon Sep 13 01:56:07 PDT 2010


Hello, I'm trying to calculate how much a polygon "points" in a given 
direction. 
This is to calculate how much light would come from a given light source.
This means that for each segment of its outer ring I want to calculate the 
scalar (dot) product of
outward normal vector (whose magnitude is the segment's length) and the given 
vector.

One idea is to rotate the polygon, and the given vector simultaneously so that 
the given vector is vertical and
then calculate the width of the bounding box.

Any comments?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100913/018353d2/attachment.html>


More information about the postgis-users mailing list