Skip to content

Instantly share code, notes, and snippets.

View mrcordiner's full-sized avatar

James Cordiner mrcordiner

View GitHub Profile
def half_sin_wave(amp,w,wave_len):
noFill()
stroke(255)
strokeWeight(1.3)
l=180*wave_len
dx = w/float(l)
px,py = 0,0
for i in range(l):
# Colors optimized for color-blind individuals.
# From: Points of view: Color blindness
# https://www.nature.com/articles/nmeth.1618
# Wong, B. Points of view: Color blindness. Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
# How many students could be affected?
# https://www.aoa.org/healthy-eyes/eye-and-vision-conditions/color-vision-deficiency
# Up to 8% of white males (less in other ethncities)
# only 0.5 percent of females of all ethnicities
@mrcordiner
mrcordiner / fac-93.pyde
Created May 9, 2020 13:39
Fac 93 Processing / Python Code
def draw_fac_number(number):
# fac93 style number
pushMatrix()
SCALE_Y=1.3
scale(1,SCALE_Y)
fill("#E380DE")
FONT_SIZE = 260
#translate(FONT_X,FONT_Y)
#print(PFont.list())
"""
Created on Mon Feb 17 14:12:37 2020
Plot of the series OEIS A265326 after watching
Neil Sloane on Numberphile.
Series is composed of the primes turned to base 2, then
reversed and base 2 numbers then subtracted from each other.
http://bit.ly/Amazing_Graphs