Random Movement, Dynamic Symbology: Part II

Image

After another round of revisions, here is a randomized example of the grizzly bear/oil well animation (first draft here).

Changes:

– swapped heat map for bread crumbs

– smoke rings appear at visited wells

– terrain map changed for satellite

– toned down oil well symbology

– improved algorithm calculating distance to wells

Advertisements

6 thoughts on “Random Movement, Dynamic Symbology: Part II

  1. jeffsteph

    The smoke ring effect is great! I can imagine symbolizing elephant crop raids with that, every time their position is within x distance of a cultivated property – smoke ring! First I have to digitize cultivated fields in Google Earth, generate KMLs, and go from there. Nice work!

    Reply
    1. dkwiens Post author

      That would be cool. Whether or not it would be computationally feasible, I’m not sure. In my example, I use the Google Maps API Geometry Library to compute distances between the bear and all nearby wells (point to point pairs) for every animation frame. It gets bogged down pretty bad if I try to calculate the distance between the bear and every point (not filtering by distance). It would work nicely if your properties were all circles, but as far as I can tell, there is no point-to-nearest-point-on-a-polygon function in the Google Maps API, so you’d have to come up with something custom (i.e. somehow using polygon coordinates and geometry).

      Reply
      1. jeffsteph

        Wow! You pulled that together quickly!

        Darren, that’s really cool, and is truly exactly what I was talking about.

        It will be some work to digitize the cultivated fields into polygons, but is labor that simply must happen and I intend to get it done eventually. In the meantime, I DO have point data for reported crop raids. So I could use the technique you used for the oil well example until I get polygons created. Also, the effect would be appropriate to visualize each instance that an elephant crosses an electric fence. I assume we could use line data as well?

        Jeff

        Reply
        1. dkwiens Post author

          Hi Jeff,

          Thanks – and yes, you could use lines basically the same way as polygons. Also, using this “hit test” method you can set it to only fire off when the location you’re testing (the elephant) touches the boundary of the polygon (a fence). See this page (http://paperjs.org/reference/path) and click on “hitTest” to see more options (fire on corner, center of polygon, etc.).

          Darren

          Reply
  2. Pingback: PaperJS Point in Polygon Test | Darren's Side Projects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s