Skip to content

Instantly share code, notes, and snippets.

View mathisonian's full-sized avatar

Matthew Conlen mathisonian

View GitHub Profile
@mathisonian
mathisonian / matrix.js
Last active August 29, 2015 14:07
lightning-import-test
var d3 = require('d3');
var inherits = require('inherits');
var margin = {
top: 20,
right: 20,
bottom: 20,
left: 45
};
@mathisonian
mathisonian / index.html
Created October 19, 2014 19:36
path tracing
<!DOCTYPE html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500);
@mathisonian
mathisonian / threejs-example.js
Last active August 29, 2015 14:07
threejs-lightning-example
// modified from http://oos.moxiecode.com/js_webgl/dna/
var THREE = require('three.js');
var ThreeTest = function(selector, data, images, opts) {
var container;
var camera, scene, renderer, composer;
@mathisonian
mathisonian / particles.js
Last active August 29, 2015 14:07
particles-test
var THREE = require('three.js');
var _ = require('lodash');
var ParticleTest = function(selector, data, images, opts) {
var width = $(selector).width();
var height = width * 0.7;
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key id="x" for="node" attr.name="x" attr.type="double"/>
<key id="tooltip" for="node" attr.name="tooltip" attr.type="string"/>
<key id="y" for="node" attr.name="y" attr.type="double"/>
@mathisonian
mathisonian / browser-export.js
Created November 9, 2014 19:54
exporting client side code
// export as a Node module, an AMD module or a global browser variable
if (typeof module !== 'undefined') {
module.exports = myModule;
} else if (typeof define === 'function' && define.amd) {
define(function() {
return myModule;
});
var d3 = require('d3');
var _ = require('lodash');
var utils = require('lightning-client-utils');
var simplify = require('simplify-js');
var margin = {
top: 40,
right: 10,
bottom: 20,
left: 10
from sets import Set
setMap = {
'aele': Set(),
'fscu': Set(),
'mcav': Set(),
'shys': Set()
}
@mathisonian
mathisonian / index.js
Last active August 29, 2015 14:10
point-cloud
var THREE = require('three.js');
var _ = require('lodash');
var ParticleTest = function(selector, data, images, opts) {
var width = $(selector).width();
var height = width * 0.7;
int ledStripRanges[19][2][2] = {
{
{900, 1018}, {600, 715}
},{
{1018, 1135}, {715, 828}
},{
{1135, 1200}, {828, 900}
},{