javafx sdk on linux

Nikolaus Gradwohl2008-10-04T10:41:00+02:00

I wanted to give the java fx sdk preview a try and got a bit confused, because there where no downloads for linux.

so i downloaded the macos version without netbeans (the zip file - not the dmg), unpacked it and set some environment variables (JAVAFX_HOME and JFX_HOME pointing to wherever you unpacked the zip file) - and TADA! A working javafx environment even under linux

if you write the code from below into a file called Hello.fx and compile it using

javafxc -d . Hello.fx

and run it using

javafx Hello

This should result in something like this helloworld

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.geometry.*;
import javafx.scene.text.*;
import javafx.scene.effect.*;
import javafx.scene.effect.light.*;

import javafx.ext.swing.*;

SwingFrame {
    title: "Hallo Welt"
    width: 310
    height: 98
    content: Canvas {
      content: Group {
        content: [
          Rectangle {
            x: 10
            y: 10
            width: 280
            height: 50
            arcWidth: 15
            arcHeight: 15
            fill: Color.web("#C0C0C0")
            effect: Lighting {
                light: DistantLight {
                    azimuth: 225
          Text {
            x: 150
            y: 40
            content: "Hello World!"
            font: Font {
              name: "Serif"
              size: 20
              style: FontStyle.BOLD
            fill: Color.WHITE
            horizontalAlignment: HorizontalAlignment.CENTER
    visible: true
read more ...

Voting trend visualisation

Nikolaus Gradwohl2008-10-02T06:16:00+02:00

After every election, there is a poll resulting in a voter trend analysis. i always liked the graphs they made from the data on tv. This time i desided to make my own voter trend visualisation in processing.

i didn't know if i would be permitted to use actual data, so i used random() to generate it.


read more ...

Downloadbots (digital version)

Nikolaus Gradwohl2008-10-01T20:09:00+02:00

Some while ago i made downloadbots from a block of wood while waiting for a longer download.

i wanted to test the "noLoop()" function from processing, so i did a digital version of them

read more ...

Shine a light

Nikolaus Gradwohl2008-09-29T21:27:00+02:00

here is another little processing-sketch. this one is dedicated to everybody who wants to shine a litte light

read more ...

rotating box in openframeworks

Nikolaus Gradwohl2008-09-29T19:17:00+02:00

I tried to write something simmilar to my neonbox-demo in openframeworks. At first a have been a bit puzzled because there is no rotate command.

Then i remembered that openframeworks uses OpenGL for drawing so glRotatef and glTranslatef can be used for rotating the image

int ang = 0;

void testApp::setup(){
    ofSetVerticalSync( true );
    ofSetFrameRate( 25 );

void testApp::draw(){
    int width = ofGetWidth() / 2;
    int height = ofGetHeight() / 2;

    ofBackground( 0,0,0 );
    glTranslatef( width, height, 0 );
    glRotatef( ang , 0, 0, 1);

    if (ang == 360) {
        ang = 0;

    ofSetColor( 255 * ( 1 + sin( ang * 2 * PI / 360 )) / 2, 
        255 * ( 1 + sin( PI + ang * 2 * PI / 360 )) / 2, 0 );

    ofRect(  -300,  -50, 100, 100 );
    ofRect(  -100,  -100, 200, 200 );
    ofRect(  200,  -50, 100, 100 );


This time i also made a little screenshot for those who don't have openframeworks installed (yet :-) )


read more ...

Zoom'n'Pan Demo

Nikolaus Gradwohl2008-09-27T16:43:00+02:00

A colleague asked me how zoom and pan could be implemented in processing. So i wrote a small "zoom'n'pan"-demo

read more ...

typo on debian

Nikolaus Gradwohl2008-09-27T12:10:00+02:00

Yesterday i have installed typo on a debian box. First i installed ruby, rails, mongrel, rake and gem - and when i wanted to install typo it told me that it didnt like my rails version :-/

so i installed rails 2.0.2 and then typo. After installing the blog, and configuring apache (i haaaaaaate mod_proxy rewrites in apache - i cant tell you how much!) typo thrwe some exceptions every time i wanted to write an article.


after googleling for some time, i found out that rails 2.0.2 isnt working with ruby 1.8.7. Instructions how to downgrade ruby can be found here and instructions how to keep debian from upgrading it again can be found here

read more ...


Nikolaus Gradwohl2008-09-22T07:45:00+02:00

I recently read about disco a implementation of the map-reduce algorithm using erlang for the master node and the workload management and python for the map-reduce jobs. Its realy funny that the nokia research labs implemented an algorithm introduced by google using a language developed by erricsson :-)

its a bit complicated to install, but once running its realy fun to code with

read more ...

ReportLab Test

Nikolaus Gradwohl2008-09-10T09:03:00+02:00

I just have tested reportlab a python-framework for pdf generation.

from reportlab.pdfgen import canvas
from reportlab.lib.units import cm

c = canvas.Canvas("hello.pdf")

c.drawString(2*cm,28*cm,"Hello World")

c.line( 2*cm, 26*cm, 2*cm, 16*cm)
c.line( 2*cm, 16*cm, 12*cm, 16*cm )

c.setFillColorRGB( 0, 0, 1 )
c.rect( 2.5*cm, 16*cm, 1.5*cm, 7*cm, fill = 1 )
c.setFillColorRGB( 0, 1, 0 )
c.rect( 4.5*cm, 16*cm, 1.5*cm, 6*cm, fill = 1 )
c.setFillColorRGB( 1, 0, 0 )
c.rect( 6.5*cm, 16*cm, 1.5*cm, 8*cm, fill = 1 )


this little script generates a pdf containing 'hello world' and a simple bar-chart. i think i will give it a try if i have to generate pdf-reports the next time

read more ...

Rotating NeonBox

Nikolaus Gradwohl2008-09-06T16:26:00+02:00

i have hacked together my next processing sketch. This time its a rotating NeonBox.

dont wait for something sophisticated to happen its just a little rotating box :-)

read more ...