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
const width=600, | |
height=800, | |
radius=50; | |
const cos = degrees => Math.cos((degrees / 180.0) * Math.PI) | |
const sin = degrees => Math.sin((degrees / 180.0) * Math.PI) | |
function addCircle(x,y,r,color) { | |
const c = new Path.Circle(new Point(x,y), r); | |
c.strokeColor = color; |
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 smoother(path) { | |
var geometric = false; | |
for (var factor=0.1; factor < 2.0; factor += 0.1) { | |
var np = path.clone() | |
np.smooth({type: geometric ? 'geometric' : 'catmull-rom', factor: factor}) | |
np.position.y += factor * 10 | |
} | |
} |
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
const lerp = (min, max, percentage) => min + (max - min) * percentage; | |
const boxer = points => { | |
const p = new paper.Path(); | |
p.strokeColor = 'purple'; | |
p.add(points[points.length - 1]); | |
points.forEach(point => p.add(point)); | |
let iters = 50; |
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
// prototype code to control the makeblock laserbot via javascript | |
// | |
// WARNING: this is a demo, do not use unless you know what it is doing, even then, probably don't use it! | |
// | |
// gcode spec from https://forum.makeblock.com/t/faqs-for-the-makeblock-laserbot/7329 | |
var SerialPort = require('serialport'); | |
const Readline = require('@serialport/parser-readline'); | |
const connect = function({path, baudRate}) { |
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 width, height, center; | |
var points = 10; | |
var smooth = true; | |
initializePath(500, 100, 200); | |
function initializePath(num_rays, radius, length) { | |
center = view.center; | |
width = view.size.width; | |
height = view.size.height/2; |
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
A.PT#9{i8vCMKb8ncZUibDqVePUZpFvLjBtUAfoKRzxbe4jvuV |
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 smoother(path) { | |
var geometric = false; | |
for (var factor=0.1; factor < 4.0; factor += 0.1) { | |
var np = path.clone() | |
np.smooth({type: geometric ? 'geometric' : 'catmull-rom', factor: factor}) | |
np.position.y += factor * 10 | |
} | |
} |
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 skimage | |
import uuid | |
import sys | |
import numpy as np | |
colors = [ | |
[92, 148, 252], | |
[0,0,0], | |
[32, 56, 236] |
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
// this works, but the right side is much more dynamic as it rotates through the space. | |
// the idea here was taking golan's https://twitter.com/anotherjesse/status/1040007965799997440 or https://editor.p5js.org/full/BJLbRp8dm | |
// and using the 3d dimension of noise for adding another dimension to noise (I think this works) | |
// but then modifying the radius of the noise to add a 3rd dimension | |
let myScale = 0.01, | |
radius = 100.0, | |
nSteps = 360, | |
width = 600, | |
height = 600, |
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 requests | |
import random | |
import sys | |
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_+=;:' | |
tries = 0 | |
while True: | |
if tries % 1000 == 0: print tries | |
tries += 1 |