Skip to content

Instantly share code, notes, and snippets.

View TheWispy's full-sized avatar

Will Humphreys TheWispy

View GitHub Profile
@TheWispy
TheWispy / query.txt
Last active October 28, 2017 13:37
GraphQL query returning matching repo names
{
search(query: "topic:hacksheffield", type: REPOSITORY, first: 10) {
repositoryCount
edges {
node {
... on Repository {
name
url
primaryLanguage{
name
@TheWispy
TheWispy / githubReturn.json
Created October 28, 2017 13:39
Returned json for query
{
"data": {
"search": {
"repositoryCount": 2,
"edges": [
{
"node": {
"name": "git-chauthor",
"url": "https://github.com/dannycjones/git-chauthor",
"primaryLanguage": {
@TheWispy
TheWispy / HydraPatch0
Created March 22, 2018 18:23
Nice hydra patch 0
o0.osc(30).color([1,1,1]).rotate((t)=>0.5*Math.random()).kaleid(5).rotate(1,1).posterize(3).modulate(o1)
o1.osc(40).modulate(o0).color([1,0,0]).add(o0).diff(o2).kaleid(3).posterize(2).rotate(1,4).contrast(2)
o2.osc(50).color([0.5,1,0]).kaleid(4).modulate(o0).modulate(o1)
render(o1)
@TheWispy
TheWispy / rgy.js
Created May 23, 2018 01:47
RGY hydra patch.js
osc(21,0,1).color(1,0.7,0.2).rotate(0.53,1).kaleid(6).modulate(o2,0.09).rotate(3,3).out(o0)
osc(10,-1).color(0,1,0.2).diff(o0,0.5).kaleid(2).rotate(1,2).out(o1)
osc(70,1).color(1,1,1).posterize(5).blend(o0,0.5).modulate(o1,0.05).brightness(0.2).contrast(3).kaleid(4).rotate(1,3).scrollY(1,0.3).kaleid(2).out(o2)
osc(10,2,2).color(1,1,0).kaleid(3).scrollX(1,-2).posterize(3).brightness(0.2).contrast(3).kaleid(2).out(o3)
render()
@TheWispy
TheWispy / acid_bus_seat.hydra
Created June 6, 2018 23:45
Acid bus seat hydra patch
osc(105).color(0.5,0.1,0.8).rotate(0.11, 1).modulate(osc(10).rotate(0.3).add(o0, 0.1)).add(osc(20,1,1).color(0,0.8,1)).out(o0)
osc(50,0.5, 0.7).color(1,0.7,0.5).diff(o0).modulate(o1,0.05).out(o1)
render(o1)
@TheWispy
TheWispy / porthole_to_daves_house.hydra
Created June 23, 2018 23:02
A hydra patch involving masking
noise(5).color(1,1,1).add(noise(10)).add(noise(20),0.5).add(noise(40),0.1).shift(0,0.1,0.1).rotate(0.03).modulateRotate(osc(10)).out(o0)
osc(25,-0.1,1.5).color(1,0.7,0).rotate(1.125).modulate(shape(6).rotate(1,1).scale(2).repeatX(3).repeatY(2)).out(o1)
shape(3).rotate(1,1).scale(1.3).repeatX(8).repeatY(5).scrollY(1,0.2).out(o2)
shape(6).color(1,0,0).rotate(-1,1).add(o2, 0.5).add(shape(6).color(1,0,0).rotate(-1,1).scale(2).kaleid(6),1).add(noise(50,2).pixelate(20,20), 0.8).mult(shape(6).rotate(1,1).scale(2).repeatX(3).repeatY(2).invert(),1).add(shape(0).color(0,0,0).add(o1,1).diff(o0).posterize(2).brightness(0.3).contrast(2).mult(shape(6).rotate(1,1).scale(2).repeatX(3).repeatY(2)), 1).add(noise(5).color(1,0,1).add(noise(10)).add(noise(20),0.5).add(noise(40),0.1).shift(0,0.1,0.1).rotate(0.03).modulateRotate(osc(10)).mult(osc(60,0.2).posterize(4).contrast(4).kaleid(6), 0.5)).out(o3)
render()
@TheWispy
TheWispy / cube_func.hydra
Created August 4, 2018 19:56
Cubish hydra function
pattern = (a, b, c, d) => shape(6,0.3,c).posterize(3).mult(osc(a, d,()=>Math.sin(b*time)).kaleid(3))
pattern(200,2,0.3, 0).rotate(1,1).out(o0)
render(o0)
@TheWispy
TheWispy / line_func.hydra
Created August 4, 2018 20:15
General purpose line-like oscillator function - pre-posterized
line = (a, b, c) =>osc(a, b, c).rotate(Math.PI/2).brightness(-0.4).contrast(6).posterize(1)
line(2, 1, 0.5).scale(0.1).rotate(1,1).modulateScale(o0.scale(0.4), 2).kaleid(3).modulate(noise(10,2).pixelate(20,2).scrollX(2,0.2)).out(o0)
render(o0)
@TheWispy
TheWispy / poisoned_perlin.hydra
Last active August 26, 2018 22:20
Noisy rainbow tunnel hydra patch
// Poisoned Perlin by Will Humphreys
// @wispeh_
osc(2,1,2).diff(o0, 0.14).rotate(0.01).scale(0.99).posterize(10,2)
//.kaleid(2)
.add(noise(2,1).rotate(0.1,0.1), 0.2)
.shift(0, 0, 0)
.out(o0)
@TheWispy
TheWispy / crumbled_kaleidoscope.hydra
Created August 26, 2018 23:28
A checkered descending spiral of ahydra patch.
osc(20, 1, 2).color(0.71,0,0.2).rotate(0,1).kaleid(6).diff(noise(2,2)).mult(shape(2,0.6).rotate(1,1)).repeat(2,2).modulate(noise(20,1)).kaleid(6).rotate(1,1).add(o0).scale(0.98).modulate(o0, 0.01).scrollX(()=>Math.sin(0.2*time)*0.01).scrollY(()=>Math.cos(0.2*time)*0.01).mult(noise(20,0.1).pixelate(20,20).contrast(2).rotate(1,-2)).add(o0).scrollY(0.01).scale(0.9).out(o0)