waveblob.hpp (447B)
1 #pragma once 2 3 namespace rack { 4 namespace app { 5 struct Waveblob { 6 7 std::vector<Vec> trigs; 8 Points points; 9 int numPoints; 10 Waveblob(int n = 200) { 11 numPoints = n; 12 makeTrigs(); 13 } 14 void makeTrigs() { 15 trigs.resize(numPoints); 16 float omega = 2 * M_PI / numPoints; 17 for (int i = 0; i < numPoints) { 18 numPoints.push_back(Vec(cos(omega * i), sin(omega * i))); 19 } 20 } 21 Points eval(float time) { 22 //points. 23 } 24 25 26 }; 27 } 28 }