The source code is at https://github.com/hnakamur/d3.js-drag-bezier-curves-example/tree/use-kld-intersections
Changed Polynomial.ACCURACY
from 6 to 15 at 2015-01-12T01:54-0900
thelonious/kld-intersections#2 (comment)
$ cat echo_arg.sh | |
#!/bin/bash | |
echo arg=$1 | |
$ ./echo_arg.sh "$6$" | |
arg=$ | |
$ ./echo_arg.sh '$6$' | |
arg=$6$ |
xcode-select --install | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
<!DOCTYPE html> | |
<head> | |
<meta charset='utf-8'> | |
</head> | |
<body> | |
<div id='example'> | |
<svg width="300" height="300"> | |
<path id="path1" d="M229.99999999999994,196.66666666666666C229.99999999999997,213.33333333333331,229.99999999999997,246.66666666666666,241.66666666666663,263.3333333333333" stroke="black" fill="none"/> | |
<path id="path2" d="M241.66666666666663,263.3333333333333C253.33333333333331,280,276.66666666666663,280,288.3333333333333,280" stroke="black" fill="none"/> | |
</svg> |
<!DOCTYPE html> | |
<head> | |
<meta charset='utf-8'> | |
</head> | |
<body> | |
<div id='example'> | |
<svg width="300" height="300"> | |
<path id="path1" d="M229.99999999999994,196.66666666666666C229.99999999999997,213.33333333333331,229.99999999999997,246.66666666666666,241.66666666666663,263.3333333333333" stroke="black" fill="none"/> | |
<path id="path2" d="M241.66666666666663,263.3333333333333C253.33333333333331,280,276.66666666666663,280,288.3333333333333,280" stroke="black" fill="none"/> | |
<path id="path3" d="M229.99999999999994,196.66666666666666C229.99999999999997,213.33333333333331,229.99999999999997,246.66666666666666,241.66666666666663,263.3333333333333C253.33333333333331,280,276.66666666666663,280,288.3333333333333,280" stroke="black" fill="none"/> |
(function(root) { | |
function BezierCurve(points) { | |
this.xs = points.map(function(point) { return point.x; }); | |
this.ys = points.map(function(point) { return point.y; }); | |
} | |
// LUT for binomial coefficient arrays per curve order 'n' | |
var binomialCoefficients = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]; |
The source code is at https://github.com/hnakamur/d3.js-drag-bezier-curves-example/tree/use-kld-intersections
Changed Polynomial.ACCURACY
from 6 to 15 at 2015-01-12T01:54-0900
thelonious/kld-intersections#2 (comment)
- hosts: localhost | |
connection: local | |
gather_facts: yes | |
sudo: no | |
roles: | |
- hnakamur.osx-defaults | |
- hnakamur.homebrew-packages | |
- hnakamur.homebrew-cask-packages | |
- hnakamur.osx-login-shell | |
- hnakamur.oh-my-zsh |
The original unuglified source code is at https://github.com/hnakamur/d3.js-drag-bezier-curves-example/blob/395b4cd5f9b619a1354472cd0d29ebfa243177cb/app/index.js
-- An example using uv.spawn with Promise. | |
-- (c) 2014 Hiroaki Nakamura | |
-- MIT license | |
-- | |
-- Used libraries | |
-- * luv: https://github.com/luvit/luv | |
-- * lua_promise: https://github.com/friesencr/lua_promise | |
local uv = require("luv") | |
require("Promise") |
local uv = require("luv") | |
local options = { | |
stdio = { | |
nil, | |
1, | |
nil | |
} | |
} |