Skip to content

Instantly share code, notes, and snippets.

View bmershon's full-sized avatar

Brooks Mershon bmershon

View GitHub Profile
@bmershon
bmershon / README.md
Last active October 24, 2016 20:12
Orbits

The Forest Fire Sensor Network simulation required the senors to be in motion. What type of motion should be used? I considered the following:

  • Random Brownian Motion.
  • Wandering behavior as described by Craig Reynolds, which I first encountered a couple of years ago while reading Daniel Shiffman's Nature of Code
  • Predictable orbits resulting from sin and cosine functions

I decided to give the orbits approach a try. Dynamic sensor networks are interesting to visualize because the changing coverage of a region seems highly dependent on the underlying motion of the sensors. A predictable orbit for each sensor

@bmershon
bmershon / README.md
Last active March 21, 2018 10:13
Holes in Sensor Networks

Sensor networks allow for regions to be scanned for the presence of a particular object. Many small devices, each capable of making some measurements, can be distributed over the desired region. The types of measurements a sensor might make include taking temperature readings, detecting electromagnetic frequencies, and recording sound levels. A more complex sensor could process video footage and find valuable information automatically.

A critical consideration for sensor networks is the “blanket” of coverage that is produced. Wherever holes exist in this coverage, it is possible to miss critical information in the region we would like to scan.

If we have sophisticated sensors capable of measuring their exact position, then it is a fairly easy task to compute the coverage of the network. However, if we have simple sensors which can only record local information, then we are

@bmershon
bmershon / README.md
Last active September 18, 2016 03:27
Point Cloud Triangulation

One problem we encounter when we attempt to form the Rips-Complex of a point-cloud is over-triangulation.

If we naively form triangles for all unordered triples of points, we create a simplicial complex that is no-longer 2-dimensional. If, for example, we wish to count the number of 1-cycles in a rips-complex formed from a 2-dimensional point cloud, we need to be careful when we add triangles.

Rips-Complex shows this particular application.

Triangles appear when all of the edges for that triangle, the three 1-simplex faces, are present. These edges appear when the balls of radius r that expand around each point first touch. How do we know which edges we should form in

@bmershon
bmershon / README.md
Last active October 12, 2017 18:48
Vietoris-Rips Complex (simplicial complex)

Copyright (c) 2014 Brooks Mershon

The MIT License - http://opensource.org/licenses/MIT

Please excuse the awful coding practices that may be found here.

This was more or less my first run at using D3 and JavaScript in an undergraduate math course (where writing code wasn't even expected, unless it was MATLAB). This was written before modular design, functional programming, and maturity had gripped the author to even a modest extent. This gadget (application seems too strong) was developed as if it were one colossal whiteboard exercise which permitted only small erasures and steady contributions over half of a semester.

The urge to go back and rearrange or modify in any way is strong, but I am choosing to leave this relic of sophomore year as a happy and messy memory of an assignment of which I am quite proud.

@bmershon
bmershon / README.md
Last active November 14, 2016 03:29
Height Functions (Topology)

Copyright (c) 2014 Brooks Mershon

The MIT License - http://opensource.org/licenses/MIT

Please excuse the awful coding practices that may be found here.

This was more or less my first run at using D3 and JavaScript in an undergraduate math course (where writing code wasn't even expected, unless it was MATLAB). This was written before modular design, functional programming, and maturity had gripped the author to even a modest extent. This gadget (application seems too strong) was developed as if it were one colossal whiteboard exercise which permitted only small erasures and steady contributions over half of a semester.

The urge to go back and rearrange or modify in any way is strong, but I am choosing to leave this relic of sophomore year as a happy and messy memory of an assignment of which I am quite proud.