var elements = data.map(function(d){ | |
return new nmap_element({ | |
id:d.id, | |
x:d.x, | |
y:d.y, | |
weight:d.weight ? d.weight : 1), | |
klass:d.class ? d.class : 1) | |
}); | |
}); | |
import TUIO.*; | |
TuioProcessing tuio; | |
PFont font; | |
int x,y; | |
void setup () { | |
size(800, 600); | |
tuio = new TuioProcessing(this); | |
<!DOCTYPE html> | |
<html><head> | |
<!-- read http://www.chrispie.com/blog/html5-logo-1037/ for more infos --> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>chrispie logo</title> | |
<style type="text/css" media="screen"> | |
</style> | |
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> |
Using voronoi tessellation on random points as a surface for images. From here you could distribute the points in a more meaningfull way e.g. using t-SNE or d3.layout.force()
This example shows the placement of a preset number of points (i) in a concentrical ring pattern. The amount of points from one ring to the next forms an arithmetic progression, whose constant difference („more“) can be varied. By inverting the formula for arithmetic series the necessary number of rings ist calculated for a given amount of points. Afterward the points are arranged equally spaced in the ring pattern. By Manfred & Christopher Pietsch
Make HiRes screenshots using node-webkit
var Spooky, config, i, run_spooky, scraping, spooky, spooky_is_ready; | |
Spooky = require('spooky'); | |
config = { | |
child: { | |
port: 8081 | |
} | |
}; |
license: gpl-3.0 |
In response to mbostock's block: Local Variables and the Tweet I implemented a little variation having a .local(name[, value)
method you can use on selections.
On set, the value is stored on the given element:
element.local("foo", value);
On get, the value is retrieved from given element, or the nearest ancestor that defines it:
var value = element.local("foo");