autofasurer http://www.autofasurer.net/wp abstract cinema - generative systems - interactive visuals Sun, 30 Sep 2012 12:45:13 +0000 en-US hourly 1 http://wordpress.org/?v=3.5 Vector http://www.autofasurer.net/wp/?p=242 http://www.autofasurer.net/wp/?p=242#comments Sun, 30 Sep 2012 12:45:13 +0000 Brecht Debackere http://www.autofasurer.net/wp/?p=242

Vector from Brecht on Vimeo.

]]>
http://www.autofasurer.net/wp/?feed=rss2&p=242 0
Quick ‘n dirty depth-map visualization in Jitter http://www.autofasurer.net/wp/?p=236 http://www.autofasurer.net/wp/?p=236#comments Wed, 13 Jun 2012 14:20:46 +0000 Brecht Debackere http://www.autofasurer.net/wp/?p=236

]]>
http://www.autofasurer.net/wp/?feed=rss2&p=236 0
In Retrospect #2: Beijing Accelerator by Marnix de Nijs http://www.autofasurer.net/wp/?p=230 http://www.autofasurer.net/wp/?p=230#comments Sun, 03 Jun 2012 22:06:44 +0000 Brecht Debackere http://www.autofasurer.net/wp/?p=230 Software development and visualization for Dutch new media artist Marnix de Nijs’ Beijing Accelerator installation.

More info on this and his other works on his website.

]]>
http://www.autofasurer.net/wp/?feed=rss2&p=230 0
Bit Quilt http://www.autofasurer.net/wp/?p=208 http://www.autofasurer.net/wp/?p=208#comments Mon, 14 May 2012 15:01:11 +0000 Brecht Debackere http://www.autofasurer.net/wp/?p=208 > 3)) ** ]]>
Made with Processing

Vimeo’s compression screws up the details quite a bit so watch it in action in realtime here.

As there are some random values at work, refreshing will yield variations.

Based on the function designed by D. Sleator in 1976: f(x, y) = ((x ^ y) & ((y – 350) >> 3)) ** 2.

]]>
http://www.autofasurer.net/wp/?feed=rss2&p=208 0
Harmonograph OpenGL http://www.autofasurer.net/wp/?p=196 http://www.autofasurer.net/wp/?p=196#comments Wed, 25 Apr 2012 18:58:14 +0000 Brecht Debackere http://www.autofasurer.net/wp/?p=196 The following code is an update of a previous post which I removed. There appeared to be something not quite right with it. At any rate, this code works perfectly. You can try it in combination with this tutorial on how to set things up in OS X Lion. (spacebar = new shape, esc = toggle fullscreen).

/*
 *  harmonograph.cpp
 *
 *  Created by Brecht Debackere on 24/04/12.
 *  2012 Autofasurer. 
 *
 */
#include <GLUT/glut.h>
#include <iostream>
#include <math.h>
using namespace std;

//initialising variables
float fRed, fGreen, fBlue, fXpos, fYpos, fFrequency, fAmplitude, fPhase, fTime, fPointsize;
bool fullScreen = false;


//initialising states 
void init()
{
    glClearColor(0.0,0.0,0.0,1.);
    //init some random values
    fFrequency = (rand()%500-250)/5.0;
    fPhase = (rand()%500-250)/5.0;
    fAmplitude = (rand()%500-250)/5.0; 
    fRed = (rand()%100)/1000.0;
    fGreen = (rand()%100)/1000.0;
    fBlue = (rand()%100)/1000.0;
    glEnable(GL_POINT_SMOOTH);
    glPointSize(0.5f);
    glEnable(GL_BLEND);
    glBlendFunc(GL_ONE, GL_ONE);
}

//reshaping the viewport and projection
void reshape(int width, int height)
{
    glViewport(0, 0, 640, 480);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(120.,(GLfloat) width/(GLfloat) height,0.1, 800.0);
    gluLookAt(0.0,0.0,12.0, 0.0, 0.0, 0.0, 0,1,0);
    glMatrixMode(GL_MODELVIEW);
	
}

//reading the keyboard input
void key(unsigned char key, int x, int y){
    switch (key){
	case 32://press spacebar for a new random figure
		fFrequency = (rand()%500-250)/5.0;
		fPhase = (rand()%500-250)/5.0;
		fAmplitude = (rand()%500-250)/5.0; 
		fRed = (rand()%100)/1000.0;
		fGreen = (rand()%100)/1000.0;
		fBlue = (rand()%100)/1000.0;
		fTime = 0.0;
		break;
        case 27://escape toggles fullscreen 
                fullScreen = !fullScreen;
                if (fullScreen) {
                    glutFullScreen();
                }
                else {
                    glutReshapeWindow(640, 480);
                    glutPositionWindow(100, 100);
                }
            break; 
	}
}

//drawing and displaying 
void display()
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glBegin(GL_POINTS); 
	while (fTime < 400.0) {
		glColor4f(fRed, fGreen, fBlue, 0.1);
		fXpos = -10*(cos(fFrequency * fTime) + cos(fPhase * fTime)*0.5 + cos(fAmplitude * fTime)*0.33);
		fYpos = -10*(sin(fFrequency * fTime) + sin(fPhase * fTime)*0.5 + sin(fAmplitude * fTime)*0.33);
		glVertex3f(fXpos, fYpos, 0);
		fTime += 0.002; 
	}
	glEnd();
	
	fFrequency -= 0.00001;   
	fAmplitude += 0.00001;   
	fPhase += 0.00001;
	fTime = 0.0;
	glutSwapBuffers();
    
}

//main loop with initialising of window and glut, assigning functions
int main(int argc, char** argv)
{
    srand(time(NULL));
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
    glutInitWindowSize(640, 480);
    glutCreateWindow("Harmonograph");    
    init();
    glutDisplayFunc(display);
    glutIdleFunc(display);
    glutReshapeFunc(reshape);
    glutKeyboardFunc(key);
    glutMainLoop();
    return 0;       
}
]]>
http://www.autofasurer.net/wp/?feed=rss2&p=196 0