Commit 2b36f111 authored by smsj's avatar smsj
Browse files

update images and interactive visualization

parent bbea9f53
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
No preview for this file type
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -12,7 +12,6 @@ import fractaL.core as fractal
DirIn = 'sample_data/'
DirOut = 'output/'
FileNameIn = '1880-2019.json'
......@@ -36,5 +35,5 @@ climatefile = pd.DataFrame.from_records(normalized_climate_data, columns=labels)
fractal.export_midi(normalized_climate_data, bpm=12,
fractal.export_midi(normalized_climate_data, bpm=15,
track_type='single')
......@@ -7,7 +7,7 @@ vertices, vertices2 = [[PVector() for e in range(pts+1)] for e in range(2)]
def setup():
global song, fftLin, fftLog, cam
size(1200, 800, P3D)
size(850, 700, P3D)
frameRate(1000)
smooth(8)
......@@ -17,7 +17,7 @@ def setup():
perspective(60 * DEG_TO_RAD, width/float(height), 2, 6000)
minim = Minim(this)
song = minim.loadFile("multi.mp3")
song = minim.loadFile("test_ipcc.mp3")
fftLin, fftLog = [FFT(song.bufferSize(), song.sampleRate()) for e in range(2)]
......
add_library('peasycam')
add_library('sound')
mic = None
amp = None
n_points, radius, step = 100, 250, 2
maximum = 250
minimum = 100
factor = .006
def setup():
global lines, mic, amp, n_cols, n_rows, cam, angle
size(450, 450, P3D)
frameRate(1000)
# Create an audio input and start it
mic = AudioIn(this, 0)
mic.start()
# Create a new amplitude analyzer and patch into input
amp = Amplitude(this)
amp.loadFile("test_ipcc.mp3")
cam = PeasyCam(this, 1400)
n_cols, n_rows = 500, 70
angle = radians(360) / n_cols
def draw():
background(0)
rotateZ(frameCount*PI/560)
diameter = map(amp.analyze(), 0, 1, 5, width)
terrain = [[0 for e in range(n_rows)] for f in range(n_cols+1)]
# Computing noise
for y in range(n_rows):
for x in range(n_cols+1):
terrain[x][y] = map(noise(cos(x * angle) * 3, sin(y * angle) * 3 ), 0, 1, 0, (diameter*exp(factor)))
lines = createShape()
for y in range(n_rows):
lines.beginShape(LINES)
lines.strokeWeight(0.4)
lines.stroke(124,30,155)#try to replace by lines.stroke(random(46,255))
for x in range(n_cols+1):
lx1 = cos(angle * (x-1) ) * (radius + (y*step))
ly1 = sin(angle * (x-1) ) * (radius + (y*step))
lx2 = cos(angle * x ) * (radius + (y*step))
ly2 = sin(angle * x ) * (radius + (y*step))
lines.vertex(lx1, ly1, terrain[x-1][y])
lines.vertex(lx2, ly2, terrain[x][y])
lines.endShape(CLOSE)
shape(lines)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment