using paper.js blendemode "xor"
A Pen by naoyashiga on CodePen.
### JHW 2018 | |
import numpy as np | |
import umap | |
# This code from the excellent module at: | |
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module | |
import random |
const I = x => x | |
const K = x => y => x | |
const A = f => x => f (x) | |
const T = x => f => f (x) | |
const W = f => x => f (x) (x) | |
const C = f => y => x => f (x) (y) | |
const B = f => g => x => f (g (x)) | |
const S = f => g => x => f (x) (g (x)) | |
const S_ = f => g => x => f (g (x)) (x) | |
const S2 = f => g => h => x => f (g (x)) (h (x)) |
const immutableJSFormatter = { | |
header(x) { | |
if (x && x.toJS) return ['span', {}, x.toString()]; | |
return null; | |
}, | |
hasBody(x) { | |
return x && x.toJS; | |
}, | |
body(x) { | |
return ['span', {}, JSON.stringify(x.toJS(), null, 2)]; |
using paper.js blendemode "xor"
A Pen by naoyashiga on CodePen.
// Create a Paper.js Path to draw a line into it: | |
var hexagon = new Path(); | |
// Color our path black | |
hexagon.strokeColor = 'black'; | |
// How many points do we want our object to have | |
var points = 6; | |
// How large should it be | |
var radius = 60; | |
// 0 to 2PI is a circle, so divide that by the number of points |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |