lo que estoy recibiendo
Lo que quiero
Estoy tratando de crear una aplicación de visualización de música y estoy atascado en el patrón de onda circular.
//draw the waveform to the screen function CircularWavePattern() { //vis name this.name = "circularWavePattern"; //draw the wave form to the screen this.draw = function() { push(); noFill(); stroke(255, 0, 0); strokeWeight(2); beginShape(); //calculate the waveform from the fft. var wave = fourier.waveform(); for (var i = 0; i < wave.length; i++) { //for each element of the waveform map it to screen //coordinates and make a new vertex at the point. var x = map(i, 0, wave.length, 0, width) * cos(i); var y = map(wave[i], -1, 1, 0, height) * sin(i); vertex(x, y); } endShape(); pop(); }; }