For the video below, I needed a way to extrude any font into 3D objects for use with ofxBullet.
There are many ways to do this and other examples using OpenFrameworks in this thread. My approach was a little more complicated than it should have been, but it worked. I used the following to get the paths of the letters for any font:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| <code>
ofPath path = font.getCharacterAsPoints(letter);
vector <ofpolyline> polys = path.getOutline();
// resample the font points so that we have a point every (x) pixels;
for (int i = 0; i < polys.size(); i++) {
// now resample and draw new dots
ofPolyline sampled = polys[i].getResampledBySpacing(samplePixels);
sampledPolys.push_back( sampled );
// outline
for (int j = 0; j < sampled.size(); j++) {
points.push_back( ofVec3f(sampled[j].x, sampled[j].y, 0.));
}
}
</code>
</ofpolyline></code> |
<code>
ofPath path = font.getCharacterAsPoints(letter);
vector <ofpolyline> polys = path.getOutline();
// resample the font points so that we have a point every (x) pixels;
for (int i = 0; i < polys.size(); i++) {
// now resample and draw new dots
ofPolyline sampled = polys[i].getResampledBySpacing(samplePixels);
sampledPolys.push_back( sampled );
// outline
for (int j = 0; j < sampled.size(); j++) {
points.push_back( ofVec3f(sampled[j].x, sampled[j].y, 0.));
}
}
</code>
</ofpolyline></code>
MORE INFO
I just got back fromt the truly inspirational DIY 3D sensing event Art && Code 3D at Carnegie Mellon University. I was one of 34 presenters for the speed presentations that must be under 7 minutes. I presented Follow This!, a twitter based first person shooter game I made using the kinect. I very excited when the audience voted the project #3 of 34!! I won this kinect plushie! Thank you to everyone who voted.
I traced over a pencil drawing with Illustrator and then laser cut this little guy with some friends at IDEO. I then used the stencil to spray paint the design onto a t-shirt.
MORE INFO
My first Android application is a Live Wallpaper with varying amounts of circles bouncing and repelling from each other. The circles respond to the accelerometer of the phone and the touch of the user. The settings allow the user to change the color scheme, the size of the circles, the number of circles and the trail amount. The user may also add a clockwise force, counter-clockwise force or force to the center of the screen.
[vimeo width=”549″ height=”309″]http://vimeo.com/14438987[/vimeo]
Read more about how to get the app and view the color options.
MORE INFO