Here you will find a collection of things I've worked on or found interesting and worthwhile to post. There is some poetry and other written works, as well as projects and programming thoughts/ideas/tips.

Calculating Minimum Volume Bounding Box

In my work I ended up needing to know the minimum volume bounding box (MVBB) of a given of points in 3d. This is also called the oriented bounding box (OBB). Finding the axis-aligned bounding box (AABB) is a simple task, however it can have a volume much larger than needed. Come to find out, finding the minimum volume bounding box is a very difficult problem with several techniques for finding it. However, I didn't find any useful code for finding the MVBB.

Binding a Lambda Function to an Object

 So I needed to bind a lambda function to an object. I've been writing code that needs to run faster than it currently does and I've traced some slow-downs to repeated comparisons that are really wasted and things don't change once the object is instantiated. For instance below is an example to show you how one might code something (note this is just an example, not actual code)

How to stop iPhone correcting "me" to "mr"

 So, my iPhone keeps auto-correcting "me" to "mr" which is really annoying. I finely got fed up and figured I had accidently taught the auto-correct to change me to mr. So I began to dig through my iPhone backup files figuring I could change things there are restore my phone to a backed-up state. Now I know that is an extremely geeky way to approach things, but hey, I'm a geek. And no there is not anyway to view the auto-correct dictionary on the iPhone. Well, after figuring out which file it actually was, it was a dead end.

Two New Must-Have Mac Programs: USBOverdrive X and DoubleCommand

Today I started working the lab as opposed to from home which has made me use a new mac pro. I love mac, I own a MacBook and it works great. But mac desktops are a different question. The macbooks trackpad works great, has the sensitivity I want, I can move my finger from one side of the pad to the other and get all the way across the screen, perfect! On the mac pro with the might mouse its as slow as a dog and the accelration is driving me nuts. So I started off on a google trek to find a solution.

Things I've Learned Working With Embedded Systems

So here will be a collection of things I've learned while working on an embedded system, so far just wiring it up and testing the chip. For those interested I'm using an ATMEGA8-16PI.

C#: Thread Safty with Monitor.TryEnter() and Thread.Sleep(0)

For my Embedded Systems class I'm working on a project where we are doing some webcam capture and video processing/effects work. To make life simple we are using OpenCV, which rocks. Our language of quote-in-quote choice is C# and to work with OpenCV we are using EmguCV wrapper/binding/what-have-you. So, while working on code that has to capture a video frame, process the frame to do face detection and a video effect, then draw a frame to display to the user I decided to throw everything into its own frame.

The Power of Generators: Simple Animation Example for MatPlotLib

I have for some time now been using matplotlib to do all my graphing in python. Its a great package! Recently I've been wanting to do basic animation of graphs, while you'd think it would be simple has turned into a bit of a trek. There is a simple animation example found here: http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html it works okay, but if you try to move the window it freezes, and you can't use anything on the toolbar.

Information Gain in Discretized Timeseries

I've been learning about information gain and playing around with it and its relation to timeseries data. For several reasons it is sometimes desirable to descretize timeseries data. For one it limits the number of unique values attainable by any time series, so for a finite lenght series there are only a finite number of possible different series.

Another Reason To Love Decorators: Pickled Functions

The more I work with python the cooler it becomes, especially the more I let my mind think of way out there things to do with the tools python provides. In my work I frequently find my self writing code in this order:

Chainned Comparisons, Generators, For-Else Loops and N-ary-Operators

So one of the coolest things I just found out about python is that it will let you chain comparisons, so 1 < a < 10 works. Even 1 < a < 10 < b < 25, and so on, you can even get really crazy and try a < 5 > b, wich is a funky way of saying a < 5 and b < 5, pretty cool huh!

Pages

Subscribe to  Glimpses RSS