Retro-3D-Neon-LineGrid in processing

Posted by Nikolaus Gradwohl Thu, 02 Sep 2010 04:07:21 GMT

I made some aimated neon 3d linegrid in processing, very retro-style.

It uses no openGL - only lines, just as i would have coded it in Basic on my Atari :-)

click here to see it!

retro 3d neon linegrid

Tags , ,  | no comments

Tweet This! submit to reddit Digg!

File Upload in Servlet 3.0

Posted by Nikolaus Gradwohl Wed, 01 Sep 2010 17:35:00 GMT

I played around a bit with the new servlet-api 3.0 and tomcat7 and i really like it. it has some nice features like servlet declaration using annotations or the support for asynchornous requesthandling, but the feature that i really really love is the support for file upload.

To handle a file upload form like this

<html>
<body>
<form action="upload" enctype="multipart/form-data" method="post">
<input type="file" name="filename"/>
<input type="submit" value="submit"/>
</form>
</body>
</html>

is to mark the servlet with an annotation and access the uploaded file using 'request.getPart("filename")' like this

package at.hpc.servlettest;

import java.io.*;
import javax.servlet.*;
import javax.servlet.annotation.*;
import javax.servlet.http.*;

@WebServlet(name="testUpload", urlPatterns={"/upload"})
@MultipartConfig
public class TestUpload extends HttpServlet {
    protected void doPost( HttpServletRequest req, HttpServletResponse res ) 
               throws ServletException, IOException {
        Part part = req.getPart("filename");

        res.setContentType( part.getContentType());
        res.setHeader( "disposition", "inline" );

        OutputStream out = res.getOutputStream();
        InputStream in = part.getInputStream();

        byte buffer[] = new byte[ 4048 ];
        int n = 0;
        while ((n = in.read( buffer )) > 0) {
            out.write( buffer, 0, n );
        }
        out.close();
    }
}

This is a really silly example that just copies the uploaded file back to the browser, but it shows how clean and simple handling fileuploads gets with this api - this is the feature i have been waiting for years!

Tags , , ,  | no comments

Tweet This! submit to reddit Digg!

Outdoor Monster

Posted by Nikolaus Gradwohl Mon, 23 Aug 2010 04:15:00 GMT

These are some monsters that have been found out on the street (tnx to sidney and paul for the ticket monster :-))

Tags  | no comments

Tweet This! submit to reddit Digg!

Curling Animation II

Posted by Nikolaus Gradwohl Sun, 22 Aug 2010 12:02:35 GMT

I made another animation with Context Free Art and a small ruby script. The scroll down to see the sourcecode I have used for this file. This animation uses the same technique i used for my first one

Curling Recursion 2 from Nikolaus Gradwohl on Vimeo.

Read more...

Tags , , ,  | no comments

Tweet This! submit to reddit Digg!

Part of a Rainbow

Posted by Nikolaus Gradwohl Sat, 21 Aug 2010 13:18:21 GMT

Sometimes rainbows try to hide behind the clouds rainbow

Tags ,  | 1 comment

Tweet This! submit to reddit Digg!

hand drawn stop motion very-short-film

Posted by Nikolaus Gradwohl Fri, 20 Aug 2010 02:50:58 GMT

This are very small pencil doodles i made while waiting that the "percusion-drill-in-concrete"-sounds in my flat go away. I then turned them into an short movie. and - tataaaa! - here it is

tataaaa! from Nikolaus Gradwohl on Vimeo.

Tags ,  | no comments

Tweet This! submit to reddit Digg!

Spool Holder printed on Makerbot

Posted by Nikolaus Gradwohl Thu, 19 Aug 2010 04:35:31 GMT

I have some spools with cables lying around on my working desk. so i printed 2 spool holders on my makerbot to tidy things up a bit.

downlaod the openscad file or the stl file to print them.

spoolholder1 spoolholder1

Tags  | no comments

Tweet This! submit to reddit Digg!

OpenFrameworks boid demo

Posted by Nikolaus Gradwohl Thu, 19 Aug 2010 02:42:45 GMT

I made a small boids demo in openframeworks. It is more or less a port of the boids demo i made in processing a while ago.

It's bin a while since i wrote c++ the last time, so i'm pretty sure i have forgotten to free some memory or have done something very unc++y :-)

of boids

Read more...

Tags , ,  | no comments

Tweet This! submit to reddit Digg!

Calling R from Processing

Posted by Nikolaus Gradwohl Tue, 10 Aug 2010 18:31:01 GMT

Processing is a simple and powerfull programming language to create images, animation and interaction.

R is a powerfull free software environment for statistical computing.

For me this sounds like a perfect match. This is a short howto that shows how these two languages can comunicate with each other.

On the R-Side I use the Rserve extension, which can be installed by calling

install.packages("Rserve")

from within the R environment.

By calling

library(Rserve)
Rserve()

from within the R, you can start a serverprocess that accepts commands on a network socket and can be used by a javaclient to execute R commands.

procesing2r

In the processing sketch we need to add the two jar files of the javaclient that can be downloaded at the Rserve download page http://www.rforge.net/Rserve/files/

just add the jar files to the sketch using "Add file ..." from the "Sketch"-Menu.

Now we can use the REngine class to execute some R code in the server process and ask R to return the calculated data

Read more...

Tags , ,  | no comments

Tweet This! submit to reddit Digg!

little 3D figure

Posted by Nikolaus Gradwohl Sun, 08 Aug 2010 17:24:28 GMT

My boss asked me to clone myself several times, so i started by making a little 3d figure in blender and printed it on my Makerbot. Not quite a clone of me, but every journey begins with a first step :-)

click here to download the stl file

figure

Tags ,  | 2 comments

Tweet This! submit to reddit Digg!

Older posts: 1 2 3 ... 28