Elevator Sim [wip]

GameDev,Processing — Dillon @ 9:25 pm

Car idle:
elevator_sim_wip_1

Car called, doors open.
elevator_sim_wip_2

Some shots from a work in progress. Elevator simulator. People are going to get on and off and ride the cars down. It’s an exercise in 3d, queuing, event detection (without using events) and a boat load of other stuff. It’s coming along nicely. The car motion is really convincing.

Reading style tween test

Processing — Dillon @ 10:04 pm

tweentest
Using the tween library from megamu, I think I finally get how to use it. Going to use it for an elevator sim. Yes, I’m building an elevator. It just struck me while riding one. “I could make this.”

Anyway, check out the reading thing here.

OpenCV in Eclipse

Blog — Dillon @ 1:22 am

I was getting a weird runtime error about native library something in Eclipse while messing around with OpenCV (using Processing.org).
!!! library OpenCV not found
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: capture

I found the answer was to configure native libraries in my project. This is something I’ve never done in Eclipse so I thought I’d post it in case someone googles this error message. First, I set up my project like the following. Notice that I created a folder named “native”. I moved the shared library files (.dll, .so, .jndilib) into this folder. I am on a mac but I moved the DLL files anyway.
opencv_eclipse_1

Then I went into my project properties and set the Native Library Location as this folder. Viola. The processing applet launches.
opencv_eclipse_2

Triangle Building

GameDev,Processing — Dillon @ 10:44 pm

triangle_building_1
I got distracted while working on an actual game and started messing around with image recognition. I was greatly inspired by the LevelHead tech demo and thoroughly depressed by Julian Oliver’s talent. I started messing around with OpenCV and wanted to track rotation of objects. I figured out that a triangle would be the best way to track rotation because a right-triangle is unique when rotated 90º four times.

So the magic triangle again. It seems it has endless uses. I started trying to draw one programmatically. But my trig skills are lacking and I needed to create a test program. My math didn’t work out that great so I asked yahoo answers. Someone named Mathmom28 answered my question perfectly and the above sheet of paper shows the end result of her answer. It’s a bit disheartening to be relying on a homework forum for answers from “Mathmom28″ but I don’t think I’m going to pass judgement on my superiors. Suddenly I feel like I’m in high school again.

The magic to this madness was a formula she posted which is something I’ve since long-forgotten: the point-slope form of a line. A line 90º perpendicular to another one is it’s negative reciprocal. In other words, y = 3x/5y at 90º is y=-5y/3x. Once I got that, it was cake to finish something that’s pretty polished.

Try out Triangle Building. The instructions are at the bottom of the screen.

triangle_building

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2012 SQUARISM | powered by WordPress with Barecity