Skip to content

Instantly share code, notes, and snippets.

@mileshiroo
mileshiroo / map.glsl
Created January 31, 2023 12:25 — forked from companje/map.glsl
map() function for GLSL known from Processing & openFrameworks
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}
what_you_need = ' '
for days in range(71):
what_you_need += 'you need to do what '
print(what_you_need)
// Miles Hiroo
// December 16, 2015
@mileshiroo
mileshiroo / gist:1cc8a80a138337e2bc9a
Created June 4, 2015 17:57
ofxRSSDK::init working with R200
bool ofxRSSDK::init(bool pGrabVideo, bool pUseTexture)
{
if (isConnected()) {
ofLog(OF_LOG_WARNING, "ofxRSSDK: Do not call init while ofxRSSDK is running!");
return false;
}
clear();
bGrabVideo = pGrabVideo;
bUseTexture = pUseTexture;
#define HWSERIAL Serial1
float brightness = 0;
float inc = .1;
int smoking = 14;
int light = 22;
void setup() {
Serial.begin(9600);
HWSERIAL.begin(9600);
@mileshiroo
mileshiroo / gist:99d970bff246ad0b5d9f
Created June 4, 2014 15:32
Coordinating Examples
Animation (Miles)
AnimatedSprite √
Sequential √
Cellular Automata (Miles)
GameOfLife √ (a bit slow, me or Python?)
Spore1 (can’t do this until color()/get/pixels are fixed)
Spore2
Wolfram