# January 10, 2008

Tonight, in what has become sort of a Garage tradition, Noah has requested his head shaved.  As is custom, Crystal has done the honers.  Pictured is a the newly hairless Noah.

# 1 comment has been made.

## From Ashi

### Wisconsin, USA

#### January 15, 2008 at 5:09 AM

Holy balls! HE'S BALD!! O.O *shock*

# January 09, 2008

Pictured is Amber.  The lighting and cropping of this image where done to detract from the character and draw more attention to the shapes.

# January 08, 2008

## Fun with trigonometry

### Math, Math Demonstration, Math Demonstration

I've been in a math mood lately and decided to have some fun with trigonometry. I coded a galvanometer in PHP and made a quick Javascript interface to control it. The position coordinates of the needle on a galvanometer are not exactly trivial--at least, doing it correctly.

First, in order to determine the location of the needle, we need to think of the range of the needle. For our needle, we used a swing of 90°, represented by the shaded red area. This is π/2 radians (for you non-math types, a full circle is 2π radians). This span starts 135° counter-clockwise from the standard 0 location. So to determine the needle position, we simple scale the needle position (in this case, 0-100) to radians 0 to π/2.

Where P is the position of the needle, 0 to 100

From there, the X and Y positions are pretty simple:

Where L is the length of the needle

We now have the coordinates for the top of the needle, but not the bottom. If the entire needle is drawn, those coordinates are simple. Y is the bottom of the chart, and X is the middle. But I wasn't going for simple and decided to hide the bottom of the needle.

What we have turns our to be a geometry problem--similar triangles. Proportionally, the two triangles the same. We know the coordinates of point A, point B and the Y-coordinate of point C. What we don't know is the X-coordinate of point C.

Now we have the full coordinates for the needle. For division marks, we can simply recycle the equation used to determine the top of the needle's location and run it twice. For the top, we extended the needle length by some amount (5 pixels in the example case) and for the bottom, decrease the needle length by the same amount. This will result in top and bottom coordinates for the divisions.

I thought about trying to come up with some sort of automatic scaling so that the chart would determine a needle length needed to fit the full 90° to the window. But I didn't like what I came up with. Instead, I simply made the needle length 3 times with height of the meter window.

Here are the results:

-
+

For testing, I made the javascript automatically update the position ever 1/2 second and redraw the image. This worked fine, but Firefox never freed the memory for any of images. I left my computer for a time and returned to find Firefox consuming over 650 MB of RAM. It took a few minutes to get Firefox to close and the system was crawling. I've herd good things about FF3 having fixed memory leaks. Let's hope that's true.

# January 06, 2008

## Banded Inverse Root Nonuniform Scatter

### Math, Math Demonstration, Math Demonstration

Last week I wrote an article about nonuniform scatted on a line function.  Today I'd like to refine the algorithm so that there is a cap on the scatter.  My previous algorithm had a theoretical limit of infinity for the range of scatter.  However, due to the limits of a random number generator, that range was lower.  Modifying the algorithm slightly, the boundaries can be modified such that the limits of the scatter can be controlled.
Here is the modified line function:
Note that the inverse root function is still very similar, with the addition of the variable S.  This is the "scatted coefficient", which defines how scatted the graph will become.  As S becomes larger, the graph will be more and more concentrated toward the actual line function.  This makes sense because as S becomes larges, the inverse root value becomes smaller.
This is the core of the inverse root function:
The range of y is:
The desired range is -1 to +1, so the end of the function divides (inverse multiplies) by range to normalize the output.  Once normalized, the magnitude M will scale the output of the function to whatever boundaries need to be.
Here is an interactive example of this algorithm at work:

Slope (m)
Y-intercept (b)
Scatter coefficient (s)
Scatter magnitude (M)

The top chart is a graph of the function and the bottom graph a histogram to show the data spread.

# January 05, 2008

## The Loft 2--"Sister Storage"

At the end of December, Liz and Amber began moving in.  Since they will are sharing the bedroom, I needed to design something for assist sleeping.  My first idea was to a get bunk bed, but that wasn't going to work out too well.  The bunk bed I had access to wouldn't have been large enough to hold two twin mattresses on top.  The solution was pretty clear--we needed an other loft.
The construction of this loft was a little different from the one we build in the living room.  The span was much shorter--just under 8 feet vs the just over 12 feet.  This meant I could get away with using smaller floor joists--2x6" at 12" spacing would achieve a load rating of 30 lbs/sq. ft.  There was, however, one interesting obstacle: in order to fit two twin mattresses, the beds would have to be placed length wise.  This would mean the loft would have to extend 6 1/2 feet across the room.  The problem: there is a door right around 6 feet.  The floor joists would have to be above the frame.  The ceiling height varies since the ceiling is vaulted, but starts at 8 feet.  Placing the loft above the door frame wouldn't leave much room on the low side.  My solution: place the last joist above the door frame and all the others underneath.  That would mean the floor would be suspended from the this first joist to the first underside joist.  That span isn't far and I knew this would work.
Construction went pretty quick--just a few hours.  Part of the reason this loft took less time was not having to rearrange the room first--it was empty.  The following day, I had planned on constructing a ladder, but it snowed heavily and the temperature dropped significantly.  So, I put off that part of the project.
Today, the temperature became reasonable again and it was time to build a ladder as well as desk and some shelfs.  The setup turned out pretty nice.  Pictured is Liz after moving into her new area.  The loft has been nick-named "Sister Storage"--because it's where I store my new adopted sister, Liz.

# 1 comment has been made.

## From Liz (http://liz-photography.livejournal.com/)

### WI84

#### January 20, 2008 at 11:04 PM

I still don't understand why my mother is so ticked with these photos. =P I'm bored visiting her at the moment. I want to come home.

# January 04, 2008

## State of drive prices

Now that the holidays are over, I've been checking on hard drive prices--and it's bad news.  Everything went up and seems to have stayed.  In the past two months, 750 GB drives have gone from under \$165 to over \$176.  Over 3 months 500 GB drives went from an average of around \$95 to over \$110.  Terabyte drives are the only good news, dropping most of the holiday season to around \$255 now.  I'll post updates as things change, but for now, it's not the time to upgrade drive storage.
Amber and Olli playing video games

# January 03, 2008

## X/Y Plot class

### Programming

I've released a brand new project called X/Y Plot.  This project has been in the work for the past month and is now ready for the world.  It is a full object-oriented PHP class for drawing X/Y graphs/carts.  I tried to design this library to be simple and setup and easy to drop into any project that needs a graph.  It's quite small--around 2,000 lines--half of which are comments.
I worked with Javadoc in my programming class and wanted to try working with automated documentation a bit more.  PHP had a project I've written about before called PHPDoc and I used this for the creation of the API documentation.  I hope someone will try the system out and see if it works for them or not.  Documentation has been one of my weaker points, but I'm working on improving that.

# January 02, 2008

## 19" Schneider repairs

A week (or two) ago my Schneider monitor stopped functioning.  It had use to exhibit a symptom of becoming dark in the center of the screen and would correct itself with vibrated (i.e. if you slapped it).  I had fixed this some time ago by clearing off dust build-up under the high-voltage transformer that I believed was causing the voltage to arc to the metal frame around the device.  This time, however, the screen was almost black and didn't want to come back at all.  So, I pulled off the back to have a look.  There wasn't much dust, but I cleaned off what there was and with the back still off, I plugged in the monitor.  When it was powered up, the screen came on as it was suppose to with a 'no signal' message.  After a few seconds, I started seeing sparking in the vicinity of the high-voltage power supply.  I quickly powered down the monitor and had a look at the area.  There was a gray wire connected to a post on the PCB.  I pulled this wire off and saw the connector had burn marks from arcing.  On the PCB, there was a resister that looked like it had been fairly cooked, but was still in one piece.  I used a piece of electrical tape to cover the area around the post and replaced the connector.  After powering up the monitor, no arcs and smell of burning.  I let it run for a bit, then reassembled the case and put the monitor back on my setup.
For now, everything is functional.  I'm not sure how much damage was done by the arcing, but the monitor is fully functional and working great.  This monitor has now been in service for 8 years, and that's not too bad.  It's a work horse and I'd definitely buy this brand again

# January 01, 2008

## Happy New Year!

Happy New Year!!!  2008 came to the Garage with a lot of noise and a bunch of people, and that's how it should be.  The party broke up around 4:30am and we had quite the mess.  Canned string was everywhere and combined with snow that people had brought in on their shoes from outside, the floor was a sticky catastrophe.  But, I had designed the Garage updates with such things in mind, and our super-ultra-mega floor just required some hot water and a mop and was just fine.
Pictured is JimJim and Katie P.