New pencil drawings
i just added 5 new pencil drawings to my drawings gallery
read more ...Robo-Necklace
I designed and printed a robo necklace
if you want to print one yourself, download the stl file or fetch the openscad and the dxf file. then stick on some moving eyes
it's licenced under a creative commons share alike licence
read more ...calling webservices from mootools, jquery or dojo
I wrote a small webservie using java6 and jax-ws. Then i wrote clients for the webservice using some some popular javascript frameworks. I used mootools, jquery and dojo for writing the clients.
I tried to use the same simple form for all the three clients to make them comparable. I also used no libraries besides the core framework classes.
click here to download the sourcecode of the clients and the java-service
read more ...line detection with hough-transform
I wrote a small processing sketch to work out how linedetection using hough-transform works.
click here to see it in action and get the sourcecode. the code is not optimised for speed but for my understanding :-) so don't complain if it doesn't work on live-video.
the algorithm takes a image that has run through an edge detection algorithm and turned into a black/white image and find where things like edges or circles are by converting the pixels from imagespace to a parameterspace where such detection is much easyer.
for each pixel that is set in the source image a set of parameters that satisfy the formular r = x * cos(roh) + y * sin(roh) is calculated and r and roh are plotted as the parameterspace image
every line in the input image results in a bunch of lines in the parameterspace that have a common intersection point.
in my example i use a input image like this
calculate how it looks in parameter space
and then reconstruct where the lines are
Printed Processing sketch
I just printed the first stl file that i generated using a processing sketch.
I used the unlekkerlib to export a stl file from a sketch that generates simple 3d spiral, used blender to add a socket and printed it on my makerbot. Skeinforge complained about some invalid triangles, but beside that it worked surprisingly well.
This is what it looks like in blender
and this is what the makerbot made of it
and this is the processing-sketch i used to generated the spiral
import unlekker.data.*;
void setup() {
size(300,300,P3D);
noLoop();
}
void draw() {
translate(width/2,height/2);
background(0);
fill(255);
lights();
noStroke();
//stroke(255);
beginRaw("unlekker.data.STL","guru.stl");
beginShape(QUAD_STRIP);
for( int i =0; i < 100; i++ ) {
for(int a=0; a < 36; a++) {
float r = 10 - map(i,0,100,0,10);
vertex( r * sin( radians( a * 10 )) + sin(radians(i*10)) * 10,
-i*1,
r * cos(radians(a*10)) + cos(radians(i*10)) * 10);
int j = i+1;
vertex( r * sin( radians( a * 10 )) + sin(radians(j*10)) * 10,
-j*1,
r * cos(radians(a*10)) + cos(radians(j*10)) * 10);
}
}
endShape();
endRaw();
}
read more ...making a video from single frames
if you have exported a directory full of single frames from a processing sketch or a tool like toonloop or gimp you can combine them to a video using mencoder like this.
mencoder "mf://*.jpg" -mf fps=12 -o output.avi -ovc lavc -lavcopts vcodec=mpeg
the mplayer manual has more details in case you need them
here is a sample video i made using toonloop and some colored buildingblocks
buildingblocks toonloop video from Nikolaus Gradwohl on Vimeo.
read more ...printed phonestand
I designed a simple stand for my phone unsing openscad. click here to download the stl file or click here for the openscad script
printed cableclip
I designed a simple cableclip that fits on my desk unsing blender. click here to download the stl file
Deploying Processing apps using WebStart
To deploy a processing sketch via java webstart export the sketch as an application (i used my randomlines sketch and exported it as a linux application).
then i wrote a simple jnlp file and copied the files to my webserver. The only thing thats left is providing a link to the jnlp file like this.
click here to dowload and launch the application
More info on jnlp and webstart can be found here
test.jnlp
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>Processing Test</title>
<vendor>guru</vendor>
<icon href="https://www.local-guru.net/jnlp/randomlines/randomlines.png"/>
<desktop/>
<offline-allowed/>
<shortcut online="false">
<desktop/>
</shortcut>
</information>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="https://www.local-guru.net/jnlp/randomlines/lib/randomlines.jar" main="true" />
<jar href="https://www.local-guru.net/jnlp/randomlines/lib/core.jar" main="true" />
</resources>
<application-desc
name="ProcessinTestApp"
main-class="randomlines"
width="300"
height="300">
</application-desc>
<update check="background"/>
</jnlp>
read more ...Smiley-O-Mat
I just finished my Smiley-O-Mat - it's a tin-box with 3 turning knobs that allows you to controll the appearence of a smiley. With 3 simple turns I can now tell your co-workers, familymembers, ... how you feel at the moment and if it is wise to talk to me right now :-)
The controllerbox is made with an arduino, the smiley generator is written in processing, and the turning knobs are printed on my makerbot
This is what the controller looks like
and here are some smileys i generated