Feb 13

Going to School

As an occasional scuba diver, it has been a privilege to see on more than one occasion the majesty that is a school of fish up close. I’ve often wondered what (if anything) is going through any particular fish’s mind as it effortlessly maintains its position in the school. It’s easy to see why some have begun to study entire herds, flocks, swarms, or schools as a singular complex organism.

Large_fish_school

About a year ago, using a few basic rules…

  1. Separation – avoid crowding neighbors (short range repulsion)
  2. Alignment – steer towards average heading of neighbors.
  3. Cohesion – steer towards average position of neighbors (long range attraction)

… I developed a simple schooling algorithm using Processing 2.1.1 in order to model this phenomenon.  In the model, there are predatory sharks (blue circles) and a food source (red dot).

I was surprised at how sensitive the schooling behavior was to the strength of the forces associated with the three rules above.  Certain combinations of varying reliance on separation, alignment, and cohesion meant that the behavior ranged from fish that wouldn’t school at all, to scenarios where several small schools would form from the initial.  In fact, getting the parameters just right (from my perspective anyways) to model realistic schooling behavior was non-trivial.  Perhaps this supports the notion that real life schools of fish are actually very complex systems that have been optimized by evolution over the course of millions of years.

 

Flocking Behavior Rules: Wikipedia

Modeling Knowledge: Nature of Code

Feb 09

Introduction and Synthesized Sound

After several iterations, Evil Quark is back!  This website exists only to collect my thoughts and reflect on my various interests.  If by some miracle of internet search you find yourself roaming these pages, I sincerely apologize for the random and hectic presentation of what you might find.  If you need clarification, have any questions, or just want to say ‘hi’, feel free to contact me!

The first project I’d like to memorialize is the building of a rudimentary synthesizer.  The tutorial that I followed can be found here:

http://hackaday.com/2008/05/01/how-to-make-a-digital-synthesizer/ 

Overall, this project was pretty awesome.  Years ago I used to make electronic music (mostly detroit and swedish style techno) so being able to create a synthesizer from scratch was both an interesting and personal project for me.   The end product was a square-wave oscillator (made from a Schmitt trigger) with an LFO.  Here’s a picture of the final circuit:

Square wave osc with LFO

Square wave oscillator with LFO

I want to have a better understanding of how the MOSFET transistor as well as the Schmitt trigger actually work (from a physics standpoint), and perhaps I’ll research this and make some informative posts in the future.

If you are wondering what the synthesizer sounds like, check out this video I made which showcases the audio.  Watch out Daft Punk!

Quick note:  The parts list on the hackaday website needs to be updated.  In particular, the Jameco link for the 47k ohm resistor links to a 47 ohm resistor.  I found this out the hard way and now have a bunch of 47 ohm resistors laying around.  If you attempt the project, make sure you get the 47k ohm resistors.  Or, you could just skip ahead and use the potentiometer instead.