July 4, 2009
Score and Four To Go
That's right - 24 days left. Current status:
Raytracer's almost finished. I just have to put a flag in to render bounding boxes, speed things up a little, and render a custom scene (unlike the one at top, which was provided by the TAs as a test.) I'll also put a bit more effort into stamping out numerical instability - especially for ray-polygon intersection - and I'll perform random supersampling to smooth things out a bit. Once I get that done, I can finally get back to my end-of-term project!
We've hit a snag in Real-Time land. System call parameters occasionally get corrupted, and it's somehow related to timer interrupts. (For full details, see here.) So far, the bug has proven itself to be highly resistant to our debugging efforts. Not all is lost, however; I'm planning to branch the repo, pare down the system to only those parts necessary to reproduce it, and tweak around until this thing is fixed. While it might cost us some short-term assignment marks, we still have time to rewrite the thing from scratch - and I'm fully prepared to do so in the absence of effective alternatives. (It's worth noting that at least one other group has followed this precipitous path!)
On a more personal note, this is the most demanding sustained workload I've ever faced. Until this month is over, weekends and holidays mean nothing to me. I'm holding up so far; the Real-Time bug brought me close to the breaking point, but I've since regained my self-confidence. The bottom line is this: I enjoy what I do. I like the challenge of it, the reward of writing something abstract to get a very concrete result. If I didn't, I would have ditched CS long ago for less silicon-encrusted pastures. If I have to remind myself of that when I'm chugging away another 10-hour stint in the Trains Lab, so be it. I'll make it through these 24 days one way or another - Evan will prevail!
That said, I'm always open to receiving words of encouragement, advice, or anything else positive.
Labels:
graphics,
month of death,
real-time,
time management,
work
July 2, 2009
Once More Unto the Breach, Dear Trains, Once More
26 days to go. It's approaching 10:30 pm (despite what the timestamp says!) and I'm currently tackling the last known problem in our kernel: interrupt-based terminal I/O. 12 hours to go before the due date - wish me luck!
Labels:
all-nighters,
interrupts,
month of death,
real-time
July 1, 2009
T -27 days
One day in. I'm ahead of schedule so far - the next Theory of Computation assignment only took 2.5 hours instead of the 5 I had allotted. Today: History of Math and Real-Time sprints, with a dash of raytracing if time permits. If everything proceeds in similar fashion, I might actually be able to pull this off without all-nighters...
Labels:
all-nighters,
month of death,
time management
June 30, 2009
The Ultimate Showdown
So this is it - the final make-or-break stretch of my most demanding term at the University of Waterloo. Over the next 28 days, I will either successfully complete Real-Time and Graphics concurrently or consign myself to a pseudorandom location within the Bermuda Triangle of exhaustion, insanity, and despair trying. In typical fashion, I've done some preliminary number crunching: assuming roughly 8 hours of productive time per day - including weekends! - I have 224 hours in which to complete four Theory of Computation assignments, an essay about Church's approach to the Entscheidungsproblem, a raytracer, two more Real-Time train control milestones, one last midterm...and both my Real-Time and Graphics projects. I believe that this feat is tractable, albeit barely so - but time will be the judge of how well my wetware handles NP-complete scheduling problems!
The clock is ticking.
The clock is ticking.
Labels:
month of death,
project,
time management,
waterloo
June 29, 2009
Following Procedure
What does three hours of work get you? A Mersenne Twister, the above image, and the revelation that, according to this book, Perlin is blissfully unaware of the finer points of Knuth shuffling. (This should not be construed as an attack on the rest of Perlin's work, which is responsible for much general awesomeness in subsequent cinematography.)
Graphics geeks will recognize this immediately; for the other 99.99% of humanity, it's an example of Perlin noise. This is the first intelligible thing to come out of my graphics term project, in which I plan to explore the exciting world of procedural generation. CG artists will commonly blend several instances of Perlin noise at different frequencies (16 pixels for my test image) to generate more complex textures. These textures are then applied to objects in the scene.
Why did I bother implementing a more complicated random number generator? Let me count the reasons:
- The default implementation uses the full 32-bit integer range and provides an incredibly long period.
- I now know exactly how my RNG works. (To be fair, I'm a bit fuzzy on the details of all those bit-shifts...but it feels good to roll your own!)
- Python uses it since Python 2.3, which is a ringing endorsement in my books. (I'm told it has become something of a defacto standard.)
Next up: I'll probably tackle Voronoi cell textures and attempt to actually texture-map a procedural texture in OpenGL. I'll also be continuing to post raytracer updates here, so keep posted! For information on the ever-changing state of my team's Real-Time Programming project, see the PsychOS blog.
Labels:
graphics,
perlin noise,
procedural generation,
textures
June 22, 2009
Shady Business
Here's the same picture as before, with one important difference: the spheres look, well, spherical. Between dancing under the stars (and early-morning fog!) and class, I've somehow managed to find both the time and requisite sanity to implement Phong shading. Given libraries for vector operations, this is a relatively trivial task; nevertheless, it adds a whole new dimension (yeah, I couldn't resist) to rendered images. I'm also computing shadow rays to get the nice (albeit somewhat pixelated) shadows on the occluded parts of spheres. Next up: box and mesh intersections, supersampling, and hierarchical rendering. I'll keep posting progress images as I go along.
Labels:
graphics,
programming,
rave,
raytracer
June 20, 2009
Here's Shooting a Ray at You, Kid
(Yes, I finally saw Casablanca a couple of weeks ago.) Exhibit A: the first meaningful image produced by my raytracer for CS 488 Assignment 4. It's a binary intersection image; it shoots a single ray from the eye through each pixel, rendering it white iff the ray intersects an object. I'll tackle Phong lighting next. For those outside the Graphics/CS bubble, Phong lighting is a relatively crude but efficient way to model the way light interacts with objects. As you can see from the Wikipedia page, it allows us to shade surfaces, thereby giving the impression of depth.
In general, raytracing is an attempt to model the way vision works. Production-quality raytracers will model reflection, refraction, transparency, scattered reflection from rough surfaces, and any number of other real-world phenomena to impart as much realism as possible to the final image. Maybe I'm strange, but I think that's cool - thanks to CS 488, I now have an appreciation for exactly how much programmer effort and CPU time go into, say, Pixar's rendering pipeline. (6-90 CPU-hours per frame, according to their site!)
One last note: although the raytracer project is by no means large, it's hefty enough that ad-hoc cp -r source control won't cut it. To that end, I've decided to give Git a spin. First impressions are positive: it's fast in all the ways that Subversion isn't, and it's ridiculously easy to set up over SSH.
Labels:
git,
graphics,
programming,
project,
raytracer
June 17, 2009
On the Right Trackball
And here is the completed spherical Trogdor (of uniform density?) You might notice a circle drawn across his beautiful Phong-shaded polygons; that's part of a virtual trackball. Roughly speaking, this allows you to rotate the model as though the scene were contained in a sphere. (Also: that site uses a rather inefficient way to get the angle between the two projected vectors - can you think of a fast approximation?) Other user-interface goodies: you can select individual joints and rotate them, causing Trogdor to coil up or flex his shapely back-arm. You can also move Trogdor around.
Just remember: if you hear from me only sporadically this term, it's because I'm doing super-fantastic-awesome things like modelling Trogdor and driving model trains. All in the pursuit of higher education!
Labels:
graphics,
programming,
trogdor,
user interfaces
June 15, 2009
Burninate the Graphics Lab
It's CS 488 Assignment 3 time, which means I get to play around with hierarchical modelling - and what better way to do so than to construct the very likeness of Trogdor? (Yeah, it's a stretch. You try modelling anything with only transformed spheres.) BURNINATE!!!!!
Labels:
all-nighters,
burninate,
graphics,
programming,
trogdor
June 4, 2009
Serial Experiments Lisp
I was watching Serial Experiments Lain when I noticed a certain LISP keyword scroll across the screen. A few posters have uploaded the still frame. Reminds me of the nmap cameo.
Labels:
anime,
cyberpunk,
LISP,
programming
June 1, 2009
Data Abort
Found an interesting article, from which I'll pull two excerpts for comparison:
"White House officials now want to make government data sets available for citizens to use however they see fit."
"The problem is figuring out how to organize and display the data in a useful and informative way, instead of forcing people to sift through heaps of mind-numbing spreadsheets."
The first is a visionary statement. It amounts to crowdsourcing data analysis, something that (if applied correctly) could rescue our governments from the technophobic morass they have so willingly plunged into. At the same time, it would provide a spectacular resource for future machine learning research.
The second, if taken at face value, is facepalm-worthy. Why? If you want a gesture like this to be effective, you have to supply the raw data. Standard graphs and charts aren't enough; let us decide how we want to visualize your data. Let us rip your datasets apart with state-of-the-art statistical analyses and classification algorithms. Better yet - allow us to upload our homebrew visualizations, hold an online voting process, and host the best examples.
Imagine this simple gesture taken to its logical conclusion: complete data transparency of government actions. There would be no room for nepotism, pork-barrel spending, and other forms of shady backroom politics. We would finally have the power to inspect the inner workings of our government, much as our intelligence agencies now monitor us. After all, it is extremely improbable that the likes of CSIS and NSA will give up the incredible power offered by telecommunications, much as it is laughable to expect the world's nuclear powers to spontaneously and permanently renounce their missile stocks; the technology is there, the knowledge is there, and nothing short of the complete destruction of mankind will change that. The best we can do is to level the playing field.
This sort of talk immediately raises national security concerns. Should it? What if every citizen had the ability to assess national security threats, much as every Wikipedia user has the ability to stop malicious edits in their tracks? Which model, in the end, is more robust - the cathedral of centralized government, or the bazaar of direct democracy?
Enough ranting from me; I've got some projective geometry to tackle.
"White House officials now want to make government data sets available for citizens to use however they see fit."
"The problem is figuring out how to organize and display the data in a useful and informative way, instead of forcing people to sift through heaps of mind-numbing spreadsheets."
The first is a visionary statement. It amounts to crowdsourcing data analysis, something that (if applied correctly) could rescue our governments from the technophobic morass they have so willingly plunged into. At the same time, it would provide a spectacular resource for future machine learning research.
The second, if taken at face value, is facepalm-worthy. Why? If you want a gesture like this to be effective, you have to supply the raw data. Standard graphs and charts aren't enough; let us decide how we want to visualize your data. Let us rip your datasets apart with state-of-the-art statistical analyses and classification algorithms. Better yet - allow us to upload our homebrew visualizations, hold an online voting process, and host the best examples.
Imagine this simple gesture taken to its logical conclusion: complete data transparency of government actions. There would be no room for nepotism, pork-barrel spending, and other forms of shady backroom politics. We would finally have the power to inspect the inner workings of our government, much as our intelligence agencies now monitor us. After all, it is extremely improbable that the likes of CSIS and NSA will give up the incredible power offered by telecommunications, much as it is laughable to expect the world's nuclear powers to spontaneously and permanently renounce their missile stocks; the technology is there, the knowledge is there, and nothing short of the complete destruction of mankind will change that. The best we can do is to level the playing field.
This sort of talk immediately raises national security concerns. Should it? What if every citizen had the ability to assess national security threats, much as every Wikipedia user has the ability to stop malicious edits in their tracks? Which model, in the end, is more robust - the cathedral of centralized government, or the bazaar of direct democracy?
Enough ranting from me; I've got some projective geometry to tackle.
Labels:
data,
government,
technology,
visualization
May 27, 2009
Thanks, Calendar
I'm not sure if I should be confused or flattered that Google thinks I speak all the above languages, despite the fairly clear linguistic limitations set up in my user settings. (Update: the problem was quite temporary; not 30 seconds later, everything appears in order.)
In other news: I've been spending an unhealthy amount of time in the Real-Time lab hacking away at an ARM context switch. As a result, our kernel now has a successful kernel exit along with a valid kernel entry point in the jump table. Unfortunately, all hell (well, 16 registers of hell, at least, plus or minus a few mode-specific versions of said registers) breaks loose upon re-entry; we're hoping to resolve this by today so that we can cap off this part of the kernel spec and get on with real life.
May 22, 2009
Real-Time Psychotics
I'm now gearing up to tackle the implementation of this specification for an embedded microkernel in the infamous Real-Time Programming course at the University of Waterloo. To share the masochism, our team has started the PsychOS blog. We'll be posting about our exploits - favourable, frustrating, pants-less, or otherwise - there, so keep posted! I'll try to mirror particularly poignant posts here at Quizzical Quincunx as well.
In other news, I've solved We Are The Swarm from Facebook's Engineering Puzzles site. This one is pleasantly devious; out of respect for the puzzle-solving spirit, I'll refrain from posting any hints. Enjoy!
In other news, I've solved We Are The Swarm from Facebook's Engineering Puzzles site. This one is pleasantly devious; out of respect for the puzzle-solving spirit, I'll refrain from posting any hints. Enjoy!
Labels:
operating systems,
problem-solving,
programming,
real-time
May 16, 2009
Two Weeks And Still Alive
Okay. It's been a while since I last posted here. Some of you may know that I've applied more than a little masochism to my course selection this term - I'm taking Real-Time and Graphics, both of which are notorious for heavy project workloads. I've made it through the first Real-Time assignment shaken but still intact, and should be on track to get Graphics (Tetris + OpenGL == fun!) finished for Thursday. Point being: if you don't hear from me, I'm not dead; I'm just in the Real-Time lab cursing at model trains.
Aside from that:
Aside from that:
- I did make it out to see Star Trek, which was nothing special.
- I'm almost finished reading through Zen and the Art of Motorcycle Maintenance, which presents a bizarre mix of quasi-autobiographical rambling, philosophical criticism of romantic-classic duality, and wanderlust. I'll reserve full judgment until I've reached the end.
- The "official" Campus Rec parkour group (as if anything about parkour could truly be official!) has started up for the term. First meet was, er, wet.
- I've signed up for the Bike and Hike - I think I'll opt for the 25 km bike.
May 7, 2009
Death From Above
(Or this DFA - whichever you prefer.)
I'm writing this in the middle of an especially sluggish induction proof in CS 360. I've decided to make a few minor but hopefully positive changes in the way I approach class:
Final note: if you are concerned about the privatization of knowledge, I strongly urge you to do the same. Keep notes, make PDFs, and distribute like crazy. Help us bridge our ingenuity gap.
I'm writing this in the middle of an especially sluggish induction proof in CS 360. I've decided to make a few minor but hopefully positive changes in the way I approach class:
- I'll try to make it to as many of them as possible - even those pesky 8:30 am ones that have marred my attendance track record in previous terms. (Not that anyone keeps track, but still...)
- I'm keeping semi-rigorous notes for any lectures that don't have nice preformatted course slides available online.
- I'm keeping those notes...in LaTeX.
Final note: if you are concerned about the privatization of knowledge, I strongly urge you to do the same. Keep notes, make PDFs, and distribute like crazy. Help us bridge our ingenuity gap.
Labels:
computer science,
LaTeX,
open learning,
school
May 6, 2009
Waterloo Sunset
Work Term Reports - why?
The utter pointlessness is
Rather annoying.
(Decided I'd, er, borrow a motif from vasavage.) Spring is here in Waterloo - the sound of construction in the air, the cranes in full bloom! At least the ensuing fracas has contributed the above sign, redolent of the kind of neon-coloured cartoon-character Engrish prevalent in Japan, to our collective student consciousness. I've snapped a couple of pics of my room, as well as a few around campus; they're up in my nascent Waterloo album. As for me, I'm scrambling to get this work term report done so I can get on with life - for high-course-workload values of life, that is.
May 5, 2009
Retrospectively Yours
One more co-op term down, one to go. What have I learned? Since I don't have any similar record for previous co-op terms, I'll flesh that out as well:
- Spring 2006: Rational Robot sucks, as does most "business intelligence" software. There's no way I'm doing testing again. Working with other co-op students is fun. Working in Waterloo during the summer is not.
- Winter/Fall 2007: Startup culture is refreshingly dynamic and fast-paced. That said, the almost complete lack of process produces crap quickly. Pair programming works. Food is adequate compensation for late-night project stints. The Salad King chilli scale is a game you can't win. Concurrency is always harder than you think. It's important to contribute in meetings - if you can't, you're not preparing enough.
- Spring 2008: Big-company culture is a living contradiction. Perks are awesome. Silicon Valley is a bubble world in all the best possible senses of the term. Testing is a crucial skill in software development. Reviews are a Good Thing, no matter how irate they make you at first. Sleep is optional. Do more better. Warm climates permit vibrant cities. Never rent a place before you meet the landlord.
- Winter 2009: Optimizing without a profiler is like driving with a nightshade on. Optimizing with a profiler will surprise you. Testing is a crucial skill in software development. Do less better. Like everything, parkour requires dedication. Like everything, building a computer is surprisingly easy once you actually do it. Presentations are less nerve-wracking than most imagine. People respect your efforts to speak their language.
Labels:
co-op,
random,
retrospective,
work
May 4, 2009
Panic! At the 401
After an epic journey down the 401 involving 5-6 coffee cups worth of caffeine, 2 hospitals, 12 hours (7 or so of which were spent either in said hospitals or in an ambulance headed thereto), and 3 carpopedal spasms (these resulting from panic attacks, which in turn were most likely induced by the aforementioned dose of caffeine), I finally made it back up to Waterloo in one piece. I'm most definitely avoiding caffeinated beverages from now on...
On a more positive note, I'll be living here for the next four months. (That said, my decision to take the infamous Real-Time and Graphics project courses concurrently may very well minimize the time I get to spend in my new digs!) I've got a decent room setup which will only get better with a few key investments in hardware - pics to follow.
I'll post some kind of winter term retrospective in the near future; for now, however, I'm off to tackle some nagging errands.
On a more positive note, I'll be living here for the next four months. (That said, my decision to take the infamous Real-Time and Graphics project courses concurrently may very well minimize the time I get to spend in my new digs!) I've got a decent room setup which will only get better with a few key investments in hardware - pics to follow.
I'll post some kind of winter term retrospective in the near future; for now, however, I'm off to tackle some nagging errands.
April 30, 2009
Meta-Work
The birds are singing, the sun is bright, the days are getting ever-longer - and I have to write another work term report. Ugh. Fortunately, a quick Google search brought up this. It's not the cleanest bit of LaTeX code, but it gets the job done! (Yes, I know I could use Word. I'll consider it next time I want to spend 90% of my time format-tweaking to obtain a layout that I can't easily reuse and share.)\
Also: the same search unearthed this (unfortunately nascent) effort to create a public repository of work report templates! Hooray for open source.
Also: the same search unearthed this (unfortunately nascent) effort to create a public repository of work report templates! Hooray for open source.
Subscribe to:
Posts (Atom)









