Skip to content

Instantly share code, notes, and snippets.

View charlieroberts's full-sized avatar

charlie roberts charlieroberts

View GitHub Profile
@charlieroberts
charlieroberts / march_7_ewwww.js
Created March 7, 2020 22:02
mandelbulb w/ simplex noise
// copy and paste into https://charlieroberts.github.io/marching/playground/
// select all and hit ctrl+enter
mat1 = Material( 'phong', Vec3(.0),Vec3(1,.8,.8),Vec3(1), 32, Vec3(0,.15,.25) )
march(
RoundUnion(
m = Mandelbulb( Noise(.225,4,.5) ).material( mat1 ),
Plane().material(mat1),
.25
)
@charlieroberts
charlieroberts / march_6_ringsringsrings.js
Created March 6, 2020 23:41
lots and lots of rings
// copy and paste into https://charlieroberts.github.io/marching/playground/
// select all and hit ctrl+enter
// turn the count up to 100 if you have a nice gfx card,
// otherwise, leave as is or risk graphics card meltdown
count = 25
Material.default = Material.white
arr = Array(count)
arr = arr.fill(0).map( (v,i) => {
@charlieroberts
charlieroberts / folding_squirmer.js
Created March 6, 2020 02:23
folding "lifeform" using marching.js
// copy and paste into https://charlieroberts.github.io/marching/playground/
// select all and hit ctrl+enter
quality = 'med' // try 'high' if you have a nice gfx card
size = .025/8
box = Box(size).material('white glow')
count = 25
mrrr = Mirror( box ).translate(size,size,size)
mirrors = [ mrrr ]
for( let i = 0; i < count; i++ ) {
// copy and paste into https://charlieroberts.github.io/marching/playground/
// select all and hit ctrl+enter
march(
ru = RoundUnion(
m2 = Mirror(
m1 = Mirror(
m = Mirror(
j = Julia( 3.5 )
.translate( .25,.25,.75 )
.material('glue')
@charlieroberts
charlieroberts / wac_2019.md
Created December 6, 2019 12:20
Workshop notes for audiovisual programming, WAC 2019

WAC 2019 Audiovisual Programming Workshop

Workshop Goals:

We will all have fun with the following:

  1. Learning the basics of various environments for graphics programming and thinking about the strategies they use for syncing with audio. This will include shader programming and ray marching.
  2. Watching videos / discussing strategies for how to “best” combine audio and visuals together. We will look at classic examples from the field of visual music and more recent contemporary examples.

Workshop Facilitator:

Charlie Roberts – charlie@charlie-roberts.com

@charlieroberts
charlieroberts / marching_mirrors.js
Last active September 17, 2020 11:25
a marching.js sketch exploring reflections
// https://charlieroberts.github.io/marching/playground/
// copy and paste, select all, and hit ctrl+enter
// tweak size/shape/cameraz. change quality to 'high' if
// you have a nice graphics card, or 'low' if needed. Making
// your browser window smaller can also improve performance.
// config
let size = .075,
count = 9,
quality = 'med',
@charlieroberts
charlieroberts / wpiccccc.markdown
Created November 7, 2019 18:58
WPI Creative Coding Club Code of Conduct (WPICCCCC)

WPI Creative Coding Slack: Code of Conduct

Welcome!

The WPI Creative Coding Slack channel is intended for current and former students and faculty interested in creative coding at WPI. It’s a place for us to share works in progress, project ideas, and opportunities for engaging with the broader community.

The current admins are:

  • Gillian Smith
  • Charlie Roberts
@charlieroberts
charlieroberts / marching_hydra_local.js
Created September 11, 2019 17:58
marching.js with hydra generated textures (local)
// first, download the hydra-synth repo: https://github.com/ojack/hydra-synth
// second, build it with browserify: browserify index.js -o hydra.js --standalone Hydra
// third, place the resulting hydra.js file in the smae directory as marching.js
script = document.createElement('script')
script.src = 'http://localhost:12000/hydra.js'
document.querySelector('head').appendChild( script )
canvas = document.createElement('canvas')
hydra = new Hydra({ canvas })
@charlieroberts
charlieroberts / sota.markdown
Created August 12, 2019 15:41
A short workshop I ran for high-school students in 2017

Notes for SOTA Workshop 2017

Dr. Charlie Roberts

Live coding with Gibber

Today we’ll be looking at live coding which is a kinda weird performance practice where people create audio and visuals by programming them live, in front of an audience. We’ll be using a system called Gibber for live coding today, but there are many, many others…. If you’re interested in live coding you can learn more at:

http://toplap.org

Step 1: Launch Gibber

Go to the follow website using Google Chrome: http://gibber.cc

@charlieroberts
charlieroberts / tidal.hydra.js
Created June 30, 2019 16:30
Code snippet to use the Tidal mini-notation into Hydra
/*
Example usage:
osc(
Tidal( '<1 20> [50 100]*2' ),
0.01,
1.4
).out( o0 )
*/