Skip to content

Instantly share code, notes, and snippets.

void setup() {
size(1000,1000);
translate(width/2, height/2);
dose(36,10,100);
dose(25,12,50);
dose(10,30,20);
}
@bdaver
bdaver / soundanalysis2.pde
Created May 5, 2017 12:07
Sound Analysis using minim library and FFT. Put a mp3 file named jingle.mp3 into data folder.
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer jingle;
FFT fftLin;
void setup() {
size(512, 480);
minim = new Minim(this);
@bdaver
bdaver / AudioVisualizationExample.pde
Created May 5, 2017 08:55
FFT Analysis example and some conditions. This example requires minim library. Put a mp3 named jingle.mp3 into your sketch's data folder.
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer jingle;
FFT fftLin;
void setup() {
size(1000,200);
minim = new Minim(this);
@bdaver
bdaver / sinewave_example.pde
Created April 21, 2017 08:13
basic sine usage for animation
float deger = 0;
float xkonum = 0;
float mag = 10;
void setup() {
size(512,512);
}
void draw() {
rect(xkonum,sin(deger)*mag, 10,10);
@bdaver
bdaver / imageshapefont2.pde
Created March 24, 2017 12:04
Week 5 : Image, Shape, Font loading
PImage foto;
PShape sekil;
PFont yazi;
int a = 0;
void setup() {
size(1000, 1000);
foto = loadImage("portre.jpg");
foto.loadPixels();
sekil = loadShape("vektor.svg");
@bdaver
bdaver / donenkareler.pde
Created March 24, 2017 08:56
Assignment 1 Example
void setup() {
size(1200,900);
fill(0);
noStroke();
background(255);
}
void draw(){
translate(width/2, height/2);
@bdaver
bdaver / imageshapefont.pde
Created March 24, 2017 08:34
Week 5 Example : Loading Images, Vector Shapes and Fonts
PImage foto;
PShape sekil;
PFont yazi;
PFont yazi2;
void setup() {
size(1000,1000);
colorMode(HSB);
noLoop();
@bdaver
bdaver / invader.pde
Created March 3, 2017 11:56
Example Assignment 1: Drawing space Invaders by using Array
int[] invader = {
1,1,1,0,1,1,1,1,0,1,1,1,
1,0,1,1,0,1,1,0,1,1,0,1,
1,0,1,0,0,0,0,0,0,1,0,1,
1,0,0,0,1,0,0,1,0,0,0,1,
1,0,0,0,0,0,0,0,0,0,0,1,
1,1,0,0,0,0,0,0,0,0,1,1,
1,1,1,0,1,1,1,1,0,1,1,1,
1,1,0,1,1,1,1,1,1,0,1,1,
1,1,1,1,1,1,1,1,1,1,1,1
@bdaver
bdaver / paletornek.pde
Created March 3, 2017 08:18
Week 3 : Array, Color, Random
color renk = #ffffff;
color renk2 = color(10,200,50,50); //r,g,b,a
color[] palet = {#FFFFFF, #FE4365, #FC9D9A, #F9CDAD, #C8C8A9, #83AF9B};
void setup() {
size(1000,1000);
frameRate(120);
background(renk);
noStroke();
//ellipseMode(CORNER);
@bdaver
bdaver / dose.pde
Last active February 24, 2017 12:26
Week 1 : Tiling examples
void setup() {
size(1200,900);
background(255);
noStroke();
fill(0);
scale(0.6);
translate(130,60);
/*
kolon();
translate(355,0);