Skip to content

Instantly share code, notes, and snippets.

View dribnet's full-sized avatar

tom white dribnet

View GitHub Profile
@dribnet
dribnet / .block
Last active September 23, 2018 12:07
Kitaoka's blue tilt
license: mit
@dribnet
dribnet / .block
Last active May 12, 2018 22:34
p5.js starter sketch
license: mit
@dribnet
dribnet / .block
Last active January 27, 2022 03:25
MDDN242 Assignment 3: Glyph
license: mit
@dribnet
dribnet / README.md
Last active March 27, 2018 02:09
updated PS2

PS2 MDDN 242 2018

This is the code for getting started with PS2. The drop down selects previous saved settings. The show data button exposes the current drawing as JSON so it can be added to the code.

Replace this README with information about your alphabet.

@dribnet
dribnet / README.md
Last active January 27, 2022 03:25
MDDN242 Assignment 2: Alphabet

PS2 MDDN 242 2018

(Replace this README with information about your alphabet. This is an example.)

Each of my letters is composed with two circles. The size and position of the first circle is fixed, but the location and size of the second circle is controlled by three parameters.

The three parameters per letter:

  • size : radius of the second circle
  • offsetx : x offset of the second circle relative to the first one
  • offsety : y offset of the second circle relative to the first one
@dribnet
dribnet / README.md
Last active July 26, 2018 02:08
CC2 Assignment 1: Clock

PS1 MDDN 242 2017

Upside-down Sundial

Sundials are always right side up. What if they were upside-down. You Just like the movie.

@dribnet
dribnet / README.md
Last active March 19, 2018 23:28
MDDN 242 Assignment 1: Clock

PS1 MDDN 242 2017

Examples of technique

How to use p5.js API and JavaScript bits.

@dribnet
dribnet / .block
Last active September 11, 2018 09:45
Powers of 10 PRINT
license: mit
height: 720
@dribnet
dribnet / .block
Last active October 18, 2017 13:29
17.2.MDDN342 PS4
license: mit
height: 720
@dribnet
dribnet / khot.py
Last active October 1, 2017 05:02
k-hot encoding (like 1-hot, but with k active bits)
# khot.py:
# an experimental generialization of 1-hot encoding, encodes a sparse binary vector with multiple bits
#
# currently the API is to call combins_table(n, k) to build an two way mapping from
# integers to n-choose-k binary vectors. returns an array and reverse lookup table.
import scipy.misc
# inspiration from https://www.reddit.com/r/algorithms/comments/4o5a9x/unique_mapping_from_integer_to_nk_combination/