Vinny, just lounging on my lap. Poor Vinny has cabin fever. It's too cold for her to go outside (she won't leave) and she's bouncing off the walls in the house. When not reeking havoc, she likes to sleep in my lap. She's taken to lounging on her back, which is kind of amusing.
This came in the other day: snow. It's only our second snowfall this winter that yielded any accumulation. After a couple weeks of unseasonably warm weather, Wisconsin must have realized it was in fact January. Temperatures fell and we received about 5 inches of snow.
Pictured is rehearsal for Samuel Beckett's PLAY. I've joined the drama club at school so I try my hand at running lights. U-Rock has a decent setup. No one really knows much about though, because no one goes to school here more then a couple years. So, I've been giving myself a crash course in theater lighting. Northing's caught on fire, I haven't tripped any breakers and I can put light on the stage, so I can't be doing that bad :)
Here is an algorithm I worked with over 10 years ago that introduced me to sine/cosine:
Xt = X cos θz - Y sinθz Yt = X sin θz + Y cosθz X = Xt Y = Yt
Xt = X cos θy - Z sin θy Zt = X sin θy + Z cos θy X = Xt Z = Zt
Yt = Y cos θx - Z sin θx Zt = Y sin θx + Z cos θx Y = Yt Z = Zt
It's purpose is to rotate a point in 3d space. Adjust for depth and you have a way to spin 3d objects. I've implemented this algorithm in an SVG graphic. It's painfully slow in a web browser, but functional. I first successfully worked with this algorithm in July of 1996 from an example I had written in assembly. I recall having problems getting it translated into Pascal, mainly because I forgot about the intermediates—you can't update X to Xt before adjusting Y. Back when I was working with this example, optimization of the algorithm was key. Two tricks were used for this: sine/cosine lookup tables and fixed-point arithmetic. The combination of the two eliminated the need for any floating point arithmetic, except to calculate the lookup tables. To speed up divisions, everything was turned into a power of two. The circle was divided into 256 divisions, so angles were denoted 0 to 255. Fixed-point was done with 32-bit unsigned integers. The upper 16-bit represented the decimal number and the lower 16-bit the fractional value. This resulted in the range ±1/2^15 to 2^16 or as small as 0.0000152587890625 to ±32767. Power of two division was done using bit-shift-right, and with the Intel 386 instruction "sar"—signed shift right. After understanding the algorithm, I wrote a 3d rotation function in pure 386 in-line assembly in Pascal. Turbo Pascal didn't support 386 instructions, but you could do a trick. Adding "db 66h" before a standard instruction resulted in the op-code using 32-bit register rather then the 16-bit. So the line "db 66h; shl dx, 16" actually translated to the instruction "shl edx, 16". It was a neat trick I picked up from some source code to play module music files. Building the sine/cosine tables for powers-of-two is pretty easy. Sn = sin( 2*π*n / N ) where N is the number of divisions in the circle, and n is the current division. At the time, I didn't know why, but I did understand that 2*pi created a complete sine table. Sometime latter, I put together 2*pi is the equivalent of 360°, but in the unit of radians. After learning a little more on the unit circle, I reconized what the 3d rotation algorithm was doing. The expression Xt = X cos θ - Y sinθ followed by Yt = X sin θ + Y cosθ when plotted for θ over 0-360° will result in a circle. Take any point x,y and apply it to the function f( x , y ) = Xt = X cos θ - Y , Yt = X sin θ + Y cosθ; the point will be rotated by θ. To do this in 3d, the rotation has to be applied three times: once for X, Y and Z. Note that when rotating along the Z-axis, the Z coordinate isn't adjusted. The same is true of the X coordinate on the X-axis and the Y coordinate on the Y-axis. This makes sense. Think of a some object, say a coffee cup. Move so you are at eye level with the cup, looking directly at the center. The brim of the cup with be up, the base down. Now, begin to rotate the cup on it's base. This is a Y-axis rotation. Note that through out the rotation, the height (top to bottom) of fetchers is not changing, but their left-right position and depth (front to back) is changing. The algorithm supports this observation. Anyhow, I couldn't resist trying an SVG implementation of my first 3d experiment. Despite great advances in speed, this example runs slow using only 27 (3*3*3) points. My original program used 1,000 (10*10*10) points and ran at a higher update rate on a machine 1/10th the speed.
I spent most of the day working on trigonometry, starting with homework in the morning and then writing a proof for piston motion in the evening. Pictured is an experiment I did painting with laser light. Using manual exposure, I setup a 30 second shutter time in a dark room. Then, using a laser, swept over the area in frame. The result: a room lite by lines of laser light. Turned out kind of neat.
There has been a lot of work to get the Garage put back in order after the building of the loft, but finally things are organized enough to warrant a picture. So here is the loft. As you can see, there are no vertical supports. The loft mounts directly to the studs on the wall. On the right side is a latter constructed out of part of the old bunk bed. The top of the loft has a railing that is fairly sturdy-- a good thing if you have a bunch of rowdy gamers up there. I did some updates today on the Indigo Dragon. We are now running Apache 2.2.3, PHP 5.2.0 and OpenSSL 0.9.8d as well as the latest Debian updates. I saw that PHP had a few new fetchers, but didn't really look into them. I started listening to a 24 part lecture on the origins of life by Robert Hazen. Absolutely fascinating, especially the field of emergence. There is a developing system of mathematics being used to define now complex system function. Emergence shows how unordered things (such as grains of sand) when put in the right conditions, come to form complex systems (such as sand waves). Emergence demonstrates that not everything simply get more chaotic over time. When there is energy, things can group and form structures from what was otherwise disorganized. It's a natural way from which to build up, as compared to the universes standard model of entropy where everything falls into disorder. Everything from little sand waves to spiral galaxies to the very building blocks of life itself.
Order from disorder is a scientific rarity. Allow me to explain it with a little bit more clarity. Did I say rarity? I meant impossibility, at least in a closed system there will always be more entropy. MC Hawking - Entropy
Keep in mind a "closed system" is one where no outside energy is introduced. In open systems, where there is external energy added to the equation, emergence demonstrates you can go against entropy, and it is possible to have order from disorder. Neat stuff.