Tuesday, November 07, 2006

It's getting pretty hairy around here. Seems like I live a very go-go-go-lifestyle now... it's like there's always this HUGE thing due TOMRROW...and as soon as I finish that, there will be some even greater obstacle to beat tomorrow... its getting tiring.

I didn't do so hot on the 315 exam tonight - which is especially frustrating considering I didn't do anything fun this weekend in lieu of studying my ass off. And what was waiting for me tonight, after said exam? Why the 315 lab report due tomorrow, of course. Blah. So I spent 2 hours on that and the damn calculations aren't turning out right - so at this point I think I've had enough for one day. Tomorrow will be better.

On the plus side, I did do one thing sucessfully today: I wrote a matlab script that makes a picture (presumably, a desktop-sized pic) of random square color blocks. Lame, huh? I found a cool website on truly random numbers (any of you who've looked into random number generators - like matlab's rand function - know it's totally useless if you want actual random numbers). Basically, this site takes "atmospheric noise" - white noise on the EM spectrum near a frequency where nobody is broadcasting - and turns it into real-time random numbers. Cool. So here goes:


clc
clear all
load rand1 %rand1 is a .mat file that presumably contains a very long vector
%(3000+ elements) "randn" of random numbers between 0 and 256
num=randn;
width=1600; %picture size width in pixels
height=1200; %picture size height in pixels
hblock=8; %desired number of vertical blocks
wblock=10; %desired number of horiz blocks
% CALCULATE
wdr=floor(width/wblock); %number of horiz pixels per block
hdr=floor(height/hblock); %number of vert pixels per block
pic=zeros(height,width,3);
tf=clock;
t=tf(6);
start=floor((t/60)*length(num));
if (start+500)>length(num)
start=start-(166*floor(t));
end
for k=1:hblock
for r=1:wblock
pic(((k-1)*hdr+1):(k*hdr),((r-1)*wdr+1):(r*wdr),1)=num(start+3*r+k)/255; %assign red
pic(((k-1)*hdr+1):(k*hdr),((r-1)*wdr+1):(r*wdr),2)=num(start+2*r+k)/255; %assign green
pic(((k-1)*hdr+1):(k*hdr),((r-1)*wdr+1):(r*wdr),3)=num(start+1*r+k)/255; %assign blue
end
end
% OUTPUT
imwrite(pic,'desktp1.jpeg','jpeg')

And here's a sample result (it should, ideally, always turn out different):



I guess it's not particularly pretty.or unique.or interesting. I just did it for fun. I think figuring out how to mess with photo editing in Matlab could be fun - maybe more in my spare time later.

The next few weeks are going to fly by - I have three off-campus interviews coming up: Kohler Faucets, Whirlpool, and Burns & Mac. Getting any of those three jobs would be awesome. Also, Thanksgiving is coming up - so not only do I get to see family but I'll meet up with Stace in Indy with her family for a day or two. But, I don't have to wait that long - she's also coming to visit this weekend (woohoo!).

Ok...must finish lab tomorrow, take data for the 315 project, and then study like a madman for the 375 exam thursday...ack! Wish me luck.