Example of flocking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
#include "ofAppGlutWindow.h" | |
class testApp : public ofBaseApp { | |
public: | |
ofImage img; | |
ofPoint corners[4]; | |
int selectedCorner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flocking | |
* by Daniel Shiffman. | |
* | |
* An implementation of Craig Reynold's Boids program to simulate | |
* the flocking behavior of birds. Each boid steers itself based on | |
* rules of avoidance, alignment, and coherence. | |
* | |
* Click the mouse to add a new boid. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <wiringPi.h> | |
#include <wiringPiSPI.h> | |
#include <iostream> | |
#include <stdint.h> | |
int main() { | |
wiringPiSetup(); | |
if(wiringPiSPISetup(0, 6000000) < 0) { | |
std::cerr << "wiringPiSPISetup failed" << std::endl; | |
} |