My own trees, synthetic nature, randomness in nature
Hello everybody,
it's been a while since I was writing here. But I am doing my exam. In mid March I should be called Bachelor of Fine Arts. So what I am doing?
I try to watch nature and bring it to live, at least in virtuality. I am watching movements in nature and what kind of force is put onto it.
However, here is a video of a early study:
But I don't want to go too deep into animation.
Interesting fact: there is a lot of noise in nature. Maybe everything is based on simple noise structures, but the eye don't catch. In programming, noise is a helpful fellow to make things look naturely.
Here's the patch:
HINT (!): Load up SC-Patch first, then run the PROCESSING patch !
// PROCESSING:
import supercollider.*;
import oscP5.*;
import netP5.*;
Synth synth;
float x;
float wind = 0.0;
float increment = 0.01;
float offset = width/2;
float schwacherWind;
float wStandort;
float easing = 0.05;
void setup() {
size(1000, 500, P3D);
synth = new Synth("filterNoise2");
synth.set("amp", 1);
synth.set("freq", 0);
synth.set("rate", 1);
synth.create();
}
void draw() {
//HG malen
background(150);
//Strichstärke
strokeWeight(0.5);
//offset für Stamm
offset = width/2;
// noiseValue auf den Wind geben und auf die Fenstergröße skalieren
float n = noise(wind)*width/7;
// mit jedem Durchgang den Wind "erhöhen"
wind += increment;
//Wind ist am Stamm schwächer
schwacherWind = n/4;
//WindStärke ausdrucken
println("Wind: "+wind);
println("Schwach: "+schwacherWind);
//Striche sind braun
stroke(150, 50, 50);
//Bäume
pushMatrix();
translate(0, 0, -500);
Baum(n);
pushMatrix();
translate(-250, 50, -200);
Baum(n);
popMatrix();
pushMatrix();
translate(+300, 50, -300);
Baum(n);
popMatrix();
popMatrix();
//Berg
fill(color(50, 150, 0, 25));
ellipse(width/2, height, 2000, 350);
/*****************************/
//Wolken
wStandort = wStandort+=n/200;
if (wStandort>=width) {
wStandort = 0.0;
}
//translate(wStandort, 200);
Wolke(wStandort, 105);
println("WST: "+wStandort);
float targetX = wStandort;
float dx = targetX - x;
if (abs(dx) > 1) {
x += dx * easing;
}
/******************************/
//An WhiteNoise in SC schick
synth.set("freq", map(n, 0, 20, 0, 700));
synth.set("amp", map(n, 0, 20, 0., 0.5));
}
void Baum(float n) {
//Stamm
line(width/2, height, offset+schwacherWind, (height-(height/3))-1);
//AstMitte
line(offset+schwacherWind, 2*(height/3), offset+n, height/3);
//KroneMitte
fill(color(150, 50, 50, 50));
ellipse(offset+n, height/3, 50, 50);
//AstLinks
line(offset+schwacherWind, 2*(height/3), (offset-30)+(n), height/2.5);
//KroneLinks
fill(color(150, 50, 50, 50));
ellipse((offset-30)+(n), height/2.5, 30, 30);
//AstRechts
line(offset+schwacherWind, 2*(height/3), (offset+30)+(n), height/2.3);
//KroneRechts
fill(color(150, 50, 50, 50));
ellipse((offset+30)+(n), height/2.3, 30, 30);
}
void Wolke(float bew, float yHoehe) {
noStroke();
fill(color(255, 255, 255, 50));
ellipse(bew, yHoehe, 65, 34);
ellipse(bew+13, yHoehe-3, 45, 44);
ellipse(bew+30, yHoehe, 40, 35);
ellipse(bew+45, yHoehe, 20, 20);
}
void exit() {
synth.free();
super.exit();
}
// SUPERCOLLIDER:
(
SynthDef(\filterNoise2, { arg amp = 1, freq = 0; var data, sig;
sig = WhiteNoise.ar(1);
data = (MoogFF.ar(sig, freq, 0, 0, amp));
Out.ar(0, data ! 2);
}).store;
)
it's been a while since I was writing here. But I am doing my exam. In mid March I should be called Bachelor of Fine Arts. So what I am doing?
I try to watch nature and bring it to live, at least in virtuality. I am watching movements in nature and what kind of force is put onto it.
However, here is a video of a early study:
But I don't want to go too deep into animation.
Interesting fact: there is a lot of noise in nature. Maybe everything is based on simple noise structures, but the eye don't catch. In programming, noise is a helpful fellow to make things look naturely.
Here's the patch:
HINT (!): Load up SC-Patch first, then run the PROCESSING patch !
// PROCESSING:
import supercollider.*;
import oscP5.*;
import netP5.*;
Synth synth;
float x;
float wind = 0.0;
float increment = 0.01;
float offset = width/2;
float schwacherWind;
float wStandort;
float easing = 0.05;
void setup() {
size(1000, 500, P3D);
synth = new Synth("filterNoise2");
synth.set("amp", 1);
synth.set("freq", 0);
synth.set("rate", 1);
synth.create();
}
void draw() {
//HG malen
background(150);
//Strichstärke
strokeWeight(0.5);
//offset für Stamm
offset = width/2;
// noiseValue auf den Wind geben und auf die Fenstergröße skalieren
float n = noise(wind)*width/7;
// mit jedem Durchgang den Wind "erhöhen"
wind += increment;
//Wind ist am Stamm schwächer
schwacherWind = n/4;
//WindStärke ausdrucken
println("Wind: "+wind);
println("Schwach: "+schwacherWind);
//Striche sind braun
stroke(150, 50, 50);
//Bäume
pushMatrix();
translate(0, 0, -500);
Baum(n);
pushMatrix();
translate(-250, 50, -200);
Baum(n);
popMatrix();
pushMatrix();
translate(+300, 50, -300);
Baum(n);
popMatrix();
popMatrix();
//Berg
fill(color(50, 150, 0, 25));
ellipse(width/2, height, 2000, 350);
/*****************************/
//Wolken
wStandort = wStandort+=n/200;
if (wStandort>=width) {
wStandort = 0.0;
}
//translate(wStandort, 200);
Wolke(wStandort, 105);
println("WST: "+wStandort);
float targetX = wStandort;
float dx = targetX - x;
if (abs(dx) > 1) {
x += dx * easing;
}
/******************************/
//An WhiteNoise in SC schick
synth.set("freq", map(n, 0, 20, 0, 700));
synth.set("amp", map(n, 0, 20, 0., 0.5));
}
void Baum(float n) {
//Stamm
line(width/2, height, offset+schwacherWind, (height-(height/3))-1);
//AstMitte
line(offset+schwacherWind, 2*(height/3), offset+n, height/3);
//KroneMitte
fill(color(150, 50, 50, 50));
ellipse(offset+n, height/3, 50, 50);
//AstLinks
line(offset+schwacherWind, 2*(height/3), (offset-30)+(n), height/2.5);
//KroneLinks
fill(color(150, 50, 50, 50));
ellipse((offset-30)+(n), height/2.5, 30, 30);
//AstRechts
line(offset+schwacherWind, 2*(height/3), (offset+30)+(n), height/2.3);
//KroneRechts
fill(color(150, 50, 50, 50));
ellipse((offset+30)+(n), height/2.3, 30, 30);
}
void Wolke(float bew, float yHoehe) {
noStroke();
fill(color(255, 255, 255, 50));
ellipse(bew, yHoehe, 65, 34);
ellipse(bew+13, yHoehe-3, 45, 44);
ellipse(bew+30, yHoehe, 40, 35);
ellipse(bew+45, yHoehe, 20, 20);
}
void exit() {
synth.free();
super.exit();
}
// SUPERCOLLIDER:
(
SynthDef(\filterNoise2, { arg amp = 1, freq = 0; var data, sig;
sig = WhiteNoise.ar(1);
data = (MoogFF.ar(sig, freq, 0, 0, amp));
Out.ar(0, data ! 2);
}).store;
)
Kommentare
Kommentar veröffentlichen