carlfoxmarten: (Default)
2010-01-22 12:37 am

More computing science

Boy, I sure enjoy working for the Computing Science department, they're very supportive, encouraging, and very appreciative.
And I've just barely begun on the project!

It was suggested that we try connecting a webcam to one of the robots, but then we'd need to use a computer.
So, if we add a computer, we can't use the Command Module, but we can have the computer control the robot directly.

Problem: The computer I'm thinking of using doesn't have any serial ports.
Solution: Get a USB to serial adapter.

When I mentioned this to the C.S. program coordinator, she indicated that the department would cover the costs, and would even order them and have them shipped direct (to the department, of course).
To help out, I found an inexpensive place to buy them.
(Powersonic, at ~$12CAN versus Future Shop at $60. An additional problem is that the battery on the laptop I'd like to use only lasts about an hour before quitting on me...)

Anyway, I've got two ideas for projects that use a webcam:
  • Laser-pointer dot follower (just need to figure out how to find the dot in an image)
  • Light or dark finder (almost trivial, just find the lightest or darkest part of the image and drive towards it)

I'm working on other ideas, as these aren't really all that interesting on their own.
I might write a framework with a GUI to control which program is currently running, possibly even with options to dynamically control each program's parameters.

Actually, that framework alone would be really handy to have, let alone any applications written with it...
carlfoxmarten: (chair)
2010-01-14 01:23 am

Yup, it's open house time again!

I've known about it since about October/November that the next Open House event my primary campus is having is going to be on March 4th.

A couple days ago, the program coordinator for the Computing Science department on that campus contacted me asking if I'd be interested in helping out again.

I think it's rather flattering that the program coordinator (which is a pretty important position) would be interested in contacting me, though I suppose I've made an impression with her before she made it to that position.
(actually with most of the department, I think...)

So, I'm thinking about doing stuff with our iRobot Create robots again, but I'm having some problems with deciding what to have them do.

I should probably first point what features the robot has:
  • Two bumpers on the front (to tell if you've bumped into anything)
  • Four cliff sensors (to tell if you're about to drive off a cliff, or stay away from stairs)
  • A wall sensor on the right side (to tell if you're near a wall. Usually used for wall-following algorithms)
  • An IR transmitter and receiver (for talking to other robots and listening for commands from a remote control or other device)
  • Two driving wheels (independent, used for mobility)
  • A bay in the back with a device connector (for a controller, such as the Command Module)
  • A serial port (for interactive control, programming via this port is not supported. You need to use a controlling device for that)
  • One or more "virtual walls" (an IR emitter that the robot can detect)

This is a fairly impressive array of sensors, however, there is very little to actually control. This in turn is what my problem is.

Last year my demonstration project was a fairly simple "escape the room" problem: navigate through a space trying to find the virtual wall indicating the exit. The program was fairly simple, actually, but didn't actually look like much.
(people seemed fairly interested in it, however, especially as a possible teaching aid)

My ideas so far are:
  • A race of some sort
  • Last year's demo (maybe change the description to something else, but most of the logic could stay the same)
  • Demo instead an Integrated Development Environment (IDE) for programming (and possibly simulating) the robots

The last one is the one I think would cost the most amount of effort, but would probably pay off bigger in the long run, as it might shorten development time for later projects.

I was even told that we could set things up the way I liked, which makes me even more inclined to get some kind of curriculum and software set up for students to learn with...
carlfoxmarten: (Default)
2009-10-17 09:22 pm
Entry tags:

The hazards of raytracing...

One of the courses I'm taking is called Image Synthesis, basically the creation of photo-realistic rendered images on a computer.

Most versions of this course require the students to write their own raytracer from scratch (or near scratch), but since you have to write everything (including the basic framework), you don't have time to fix any major mistakes you make.

Instead, I'm adding code to an existing raytracer called PBRT, which stands for Physically-Based Rendering Toolkit, to understand how major aspects of raytracing works, such as depth-of-field (as simulated by actual lens systems), space partitioning (for major speed boosts), and what are called "Bidirectional Reflectance Distribution Functions" which dictate how a surface looks (and are usually based on how the physics works).

My current assignment is writing a new camera system for PBRT that simulates an actual lens system (not just one lens for simple depth-of-field, but multiple lenses for many different effects, from telephoto to fisheye lenses).

It took me the first week to understand just what I'm supposed to modify, the second week to figure out how to modify it, and this week to figure out just what I'm doing wrong.

I'm quite certain that my code to bend the light rays through the lenses is correct, as all light rays seem to be passing through all the lenses, but for some strange reason the weighting of the light rays seems to be way off, as the resulting image is always pure black.

Very confusing. >.<
carlfoxmarten: (Default)
2009-10-04 01:05 am
Entry tags:

Matthias Wandel, fun with wood

Okay, somehow this came up in the related list of a domino video on YouTube, and it was so cool I just had to share it:

Somebody made a wooden marble contraption with an innovative "pump", in essence a block of wood with a "plug" that slides up and down as the block slides back and forth, effectively grabbing a marble and pushing it up into a stack of marbles.

Wooden marble contraption 1: YouTube, official page
Wooden marble contraption 2: YouTube, official page

The stuff he's done is pretty cool, and includes a Jenga gun: YouTube, official page
(you can find an earlier version on his original website through the links above)

One of his new websites (woodgears.ca) has a bunch of wooden devices, projects, etc., and he's even built his own wooden organ!

You can find his YouTube channel here, and his personal website here.

Cool stuff!
carlfoxmarten: (Default)
2009-06-23 12:56 pm
Entry tags:

(no subject)

After finding out why my Tetris-Power project wasn't running on my laptop, I've resumed development on it.
(apparently, my embedded Intel graphics-card doesn't do anti-aliasing, so I'm now making it fall back to no anti-aliasing if none is available)

Currently, I have a working "screen" system (to show and hide screens such as Options, the Main menu, the Splash/loading screen, and of course the main game screen) which I'll be using extensively to split the main drawing code out of the main entry point.

I still don't have any artwork done up for it though, and that's going to be very important if I want this to look professional...

Next I need to work on, well, the rest of it, including widgets (button, checkboxes, drop-down menus, etc. Mostly for the Options screen), the mesh-loading system, the block shapes and colours, the input system, and then powerups.

I guess I still have a long way to go...
carlfoxmarten: (Default)
2009-03-01 11:34 pm

Academic projects

Near the beginning of January I wandered around the CS department on my local campus, talking with the instructors and staff I knew and seeing what might be happening for this year's open house event.

Interesting what you can get into when you know people, and they know you.

Apparently, one year an instructor used the last twenty-five hundred dollars of his grant money to buy as many iRobot Create robots as he could, and ended up with eight of them, along with all the accessories.
As they were not purchased for a particular use, they were not being used for anything, and it was wondered if anything could be done with them, and not just for the open house (which, in itself is pretty big affair on this campus).

As some of you may have guessed, I stepped up to the task and was given access to the lab and use of a laptop (so I wouldn't have to lug my 4-pounder around too much) and was mandated to provide an educational tool for programming them.
A demo of the current progress was also scheduled for the open house so we had something interesting to show.

So, over the last six to eight weeks I've written a nearly-complete Python API which, unfortunately, required that the robot be plugged into the computer to use, limiting the capabilities.
As they also came with a microcontroller to plug in the back, I also wrote a C API which was more powerful, more useful and more portable.

To test the API, I wrote a short demo program that attempted to escape from a room, using one of the Virtual Walls across the door to indicate when it escaped and the wall sensor to follow the wall once it found one.
(it was also dumb enough that it could get "stuck" on an obstacle in the middle of the room indefinitely, which was one of the things I pointed out during the open house demonstration, and asked for ideas for identifying when the robot got stuck)

Anyway, the open house had been on Thursday, and was a huge success, with the vast majority of people seeing the demo responding positively (and were also interested in some first- and/or second-year CS courses being taught with them, which may be my Master's thesis if it and I get accepted as a graduate student).

I definitely had some fun building the software and testing it, and then almost got hoarse during the open house due to the number of people to talked to.
(I'm pretty sure that I spoke to one off-campus reporter, too, in addition to our public-relations person)

The software will be made available for free under some open-source license once I figure out how to use SVN...
(man, I didn't realize how much I liked Git until I tried to use other version-control systems...)

So, yet another example of stepping in to fill some semi-useful role...

Kinda feels good, you know?
carlfoxmarten: (Default)
2009-02-16 07:21 pm
Entry tags:

Simple Tetris v1.1 update

The conversion from GLUT to SDL is complete and the game works acceptably.

The only issue I have right now is the motion isn't as smooth as it should be.

It could be due to SDL using a user-driven event loop instead of a more tightly-controlled event loop in the library in question.
I've tested two methods so far, and neither use "constant rendering" as most of the documentation and tutorials suggest, as I really don't like it when such a simple game like this tries to use up all CPU time.

The two options I've been testing so far use either a dedicated thread or an interrupt-based timer to run most of the game logic.

Of the two options, I have to say that the thread-based version seems to be smoother than the timer-based version.
I suspect this is due to the timer-based version interrupting the rendering code or the rendering code locking out the timer or something like that.

Aside from all this, it seems that all the minor parts are in place and understood for my next version of Tetris, Tetris Power.
(from what I have written about it so far, it's going to rather epic. The big question, however, is whether I can translate what I've written into a complete computer game..)

But before then, I will be releasing Simple Tetris version 1.1 for all to play with so I get more feedback on it, I just need to iron out a couple extra things that aren't quite right first.

Anyway, good things are yet to come from me.
(as well as more work done on the Magpie House Redesign, namely the Carry On Cast page, but it won't be ready for quite a while yet)
carlfoxmarten: (Default)
2009-02-15 01:50 am

Project updates

Hmm, I haven't said anything about what I've been doing recently, mostly as nothing interesting has happened since last update...

Anyway, I've made a breakthrough on my OpenGL font engine, now all I need is a good font to use for further testing, then Simple Tetris V1.1 will be complete and I can do some more work on Power Tetris.
(I'm not sure how long that one will take to write, mostly due to the amount of abstraction I usually try to put in to make sure that things don't get kludgy too quickly)

I'm also going to be working with a classmate on one of our ex-class projects, which will probably warrant a complete rewrite from scratch to ensure that things work properly and isn't built out of stuff randomly bolted together to see if they work.
(you know that too many cooks spoil a broth, right? Well, too many programmers in a small space can break and befuddle code real quick, too)



In other news, my brother recently picked up an old used typewriter from a second-hand store for about ten dollars.
It still works perfectly, and we've figured out how most of it works (aside from one small, unlabelled lever).

I'm kind of tempted to pick one up myself next time I see one (if, of course, I do find one), I think it might be kind of nice to write stuff on without the added distraction of all the games I have on my computers, or music, or desktop backgrounds, etc.

But then comes the question of where I would put such an item...
Yup, time to rearrange my room again, and throw out those old computer cases and the old boxes that I don't need anymore, and, well, you get the picture.



Work on the Magpie House Redesign has kind of come to temporary halt as I've lost my sense of direction on it.
So far I have the main page and a template for the individual pages, but I'm not sure what other pages will be needed.

I should probably write a cast page, and maybe set up some sort of gallery system for Kathy so its easy for her to use, so maybe she'll use it to post more pictures on.

One of my main problems is the front page and where things should go on it.
So far it's okay, but it's not really laid out to permit new things to be added and still look alright.
(I suppose I should ask Kathy how public I should be making the development so I know how many people to give links so I can get more feedback...)

As for colour scheme, I'm still unsure. I've switched to a light tan colour set and it works well, but it's not blue like Kathy'd asked for originally, so we'll see what she things about it.

I dunno, maybe I'm making this out to be more than it is, but you have to admit that lots of vocal people are going to see this site three times a week...
carlfoxmarten: (Default)
2009-01-10 06:21 pm
Entry tags:

Projects on the go

I thought it would be interesting (for all of us) if I listed most of the projects I'm currently working on.
All are in various stages of completion, and most are programming projects, though some are computer artwork.

So here is a list in no particular order of projects I'm currently working on:
  • Tetris v1.1:
    This is a simple rewrite of some of the graphics and window code for my original Tetris game. It has a higher priority than Tetris Power, due to being rewritten in SDL and needing a font engine.
  • Tetris Power (otherwise known as Tetris v2.0):
    A complete, from-scratch Tetris-clone using SDL for cross-platform capabilities that will have a large number of powerups. Updates as they happen, only on Carl's LJ!
  • Networked action game: (name available upon request)
    I'm currently in the process of rewriting an ex-course project (and, it seems, without most of the members who worked with me on it), so I'm rewriting certain things in grand style to ensure that it's as flexible and efficient as possible. So far I've started to rewrite the network message system, which has broken almost all other modules (at least, until I finish that part and go on to actually use it elsewhere). I'll also be completely rewriting the display code to decouple it from the game engine (which may also get an overhaul) and so I can use any of a number of front-ends (currently slated to include 2D and 3D variants).
  • Ani-Midi:
    No, I haven't forgotten about this project, and I will be working on this again, though now I'm not sure when I'll get back to it, as I have quite a number of projects on the go already and don't have the interest for it again (not to say that it won't ever be done, it's just that all these projects seem to have a timeshare agreement on my brain, and it's not this guy's turn yet). Several things I need to do with this is completely rethink the way this needs to designed. When I first wrote this, there was two ends of a chain to work on, the MIDI side and the graphics side, and I started at each end (though primarily focusing on the graphics end) and tried to work my way towards the middle, which led to a rather large problem when I actually got there. Next time I need to start at the MIDI side and work my way in the direction of the graphics end, keeping in mind how I had managed it last time so I have some idea of what's needed there.
  • Space Tree:
    This is a piece of artwork I'm currently designing, as usual, in Blender. It's primarily a pressurized garden dome for rest and relaxation in space, with the centrepiece being a large tree. A spiral staircase will lead down from the dome to a separate area, which I don't currently plan to think about. The rest of the area will contain flowers, bushes, benches, etc. Aside from this, I don't know much more about it, aside from the fact that it looks cool in my head...
  • Magpie House Redesign:
    Last but certainly not least is redesigning Kathy's entire website to streamline it (amongst other things). It has come to my attention that people would really like a story arc page (and/or an archive page), so I would like to create one for her that would take a minimal amount of time on her part, which means I need to figure out what it should look like. I've already received one or two ideas from Marmoe, so I was wondering if anybody else would be interested in coming up with another one. Any takers? You can send me a message here on LJ or send it to me via e-mail by the following e-mail address: "c fox marten AT inbox DOT com"

    Not the largest number of projects I've worked on at once, but there it is.


    Incidentally, I found an old DOS game that is kind of similar to what I'm working on, but without gravity.

    It's called Squarez, and it's written by the same people who wrote the similarly-old Jetpack DOS game.
    (both are available from Adept Software in a single zip file)

    The initial key setup is a little awkward for me as I'm used to the drop and rotate keys being in the other order, but you get used to that after a while.

    I might be inspired by some powerups from it as I write Tetris-Power, in case I miss anything, but not much...


    In addition to all of the above, I'm currently taking two math courses (probably a bad idea, but they're on rather different topics, so it's probably not that bad an idea).
    One is an introductory statistics course that I should have taken a while ago and the other is Calculus level 2 (otherwise known as Integral Calculus), which I am taking again after failed it the first time round (I blame the instructor. My current instructor is one I've taken several math courses with already, so I know him a little better).

    So I'm currently on campus five days a week, alternating between the statistics class on Monday, Wednesday and Friday, and the Calculus course Tuesdays and Thursdays.


    Also, to top off that again, I might be delivering a second route on top of the one I'm running already, which would make this the second time that I deliver two routes at once (you know what I mean!).

    As far as I'm concerned, I've delivered newspapers to three different routes in my area in the years I've been delivering papers.
    Also, as far as the newspaper is concerned, I've delivered three different routes as well (and yes, they are the same).

    The difference between the above is that, before I was the one whose name was on the route, my brother's name was on the route, and we delivered papers together.
    After a time, my brother got a "real" job at a warehouse, transferring the route to my name and leaving me to continue delivering.

    I must say that, while it's not easy to do all the time, it's become difficult for me to do a poor job at it.
    (that's a good thing, right?)

    When I started delivering newspapers again after taking a "vacation" off, I actually impressed several people due to the deep snow I waded through to make sure people got the paper.
    (it's a free local newspaper, so it's not quite as imperative that it get delivered properly, but I just can't quite let myself not do it, so I do it anyway)

    I'm still looking for another sled to help carry the papers on really snowy days (which might only get used about three times a year on average, but could be used for hill sledding on off days), the places I'd usually look haven't had anything that could be used for these purposes at all...