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
// https://api.mapbox.com/styles/v1/mapbox/streets-v8/static/0,0,2/600x600?access_token=pk.eyJ1IjoiY29kaW5ndHJhaW4iLCJhIjoiY2l6MDJ0Mjk5MDQ1dzJ3bzRiM29zaW16ayJ9.guiqnHMGUq196Zxa1d3UPg | |
var mapimg; | |
var zoom = 1; | |
var data; | |
var ww = 900; | |
var hh = 900; | |
var clat = 0; //37.7749; | |
var clon = 0; //-122.4194; |
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
var mapimg; | |
var bounds; | |
function setup() { | |
createCanvas(800, 600); | |
angleMode(RADIANS); | |
var size = [800, 600]; | |
//var center = [2.3522, 48.8566]; | |
var center = [2.3522, 48.8566]; |
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
// Please copy and paste the code to the p5 web editor to do the following questions. | |
var p; | |
var x = 50; | |
var y = 50; | |
function setup() { | |
// create a p element. | |
p = __________('Waiting.'); | |
} |
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
// Node version of this example: https://github.com/shiffman/A2Z-F16/tree/gh-pages/week3-apis-data/11_clarifai_test | |
// A2Z F16 | |
// Daniel Shiffman | |
// http://shiffman.net/a2z | |
// https://github.com/shiffman/A2Z-F16 | |
var request = require('request'); | |
var clientID = '___'; |
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
// Using the Twit node package | |
// https://github.com/ttezel/twit | |
var Twit = require('twit'); | |
var config = require('./config.js'); | |
var T = new Twit(config); | |
// lat long bounding box | |
var newyork = '-74,40,-73,41'; | |
var stream = T.stream('statuses/filter', { track: 'rainbow', locations: newyork }); |
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
function setup() { | |
createCanvas(400, 400); | |
angleMode(DEGREES); | |
} | |
function draw() { | |
background(220); | |
arc(200, 200, 100, 100, 0,135); | |
} |
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
function setup() { | |
createCanvas(400, 400); | |
} | |
function draw() { | |
background(220); | |
} |
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
Tree tree; | |
float min_dist = 5; | |
float max_dist = 250; | |
void setup() { | |
size(180, 300); | |
tree = new Tree(); | |
} |
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
import processing.video.*; | |
Capture cam; | |
void setup() { | |
size(640, 480); | |
cam = new Capture(this, 640, 480); | |
cam.start(); | |
} |
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
void setup() { | |
Serial.begin(9600); | |
pinMode(3,INPUT); | |
} | |
void loop() { | |
Serial.println(digitalRead(3)); | |
delay(10); | |
} |