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
#!/usr/bin/python3 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import os | |
import skimage.measure | |
def dedisperse(intensity, DM, nu_high, chan_width, timestep): | |
dedispersed = np.copy(intensity) |
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
#!/usr/local/bin/node | |
var simulateEarthSunSystem = function(){ | |
var G = 6.67e-11; | |
var earth = { | |
x: 150e9, // m | |
y: 0, | |
radius: 6371e3, // m | |
m: 5.9e24, // kg |
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
acko.net | |
http://www.playfuljs.com/a-first-person-engine-in-265-lines/ | |
http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-1-writing-a-simple-raytracer/ | |
http://learningwebgl.com/blog/?page_id=1217 | |
http://jsfiddle.net/vz5aZ/2/ | |
http://jsfiddle.net/uzMPU/ | |
http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene | |
http://shdr.bkcore.com/ | |
http://vimeo.com/88957041 | |
http://www.youtube.com/watch?v=NdcnQISuF_Y |
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 pi = Math.PI, | |
cos = Math.cos, | |
sin = Math.sin; | |
var thetaStep = 0.1; | |
var angle = pi; | |
var r = 10; | |
var length = 50; | |
var offx = offy = 125; |
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 pi = Math.PI, | |
sin = Math.sin, | |
cos = Math.cos | |
var t = 0; | |
setInterval(function(){ | |
var data = [sin(t)+1, cos(t)+1, sin(t)+1, cos(t)+1, sin(t)+1]; | |
// bind circle elements to data |
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
randomInt = (min, max) -> | |
Math.floor(Math.random() * (max - min + 1) + min) | |
capitalize = (string) -> | |
string[0].toUpperCase() + string.slice(1).toLowerCase() | |
getRandomSyllable = -> | |
vowels = 'aeiouy' | |
consonants = 'bcdfghjklmnpqrstvwxz' | |
consonantSounds = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','z','th','ch'] |