Skip to content

Instantly share code, notes, and snippets.

View nasser's full-sized avatar
🛰️
save-lisp-and-die

Ramsey Nasser nasser

🛰️
save-lisp-and-die
View GitHub Profile
@nasser
nasser / flower.rb
Created December 18, 2010 05:31
Minor change to line 63 changes whole sketch
p = 1 - i / min_history.to_f
@nasser
nasser / flower.rb
Created December 18, 2010 05:32
Polygonal Flower Code
class Particle
attr_accessor :x, :y
attr_accessor :fx, :fy
attr_accessor :history
attr_accessor :lifespan
def initialize x, y
@x = x
@y = y
@nasser
nasser / ballerina.rb
Created December 18, 2010 05:33
Abstract Ballerina Sketch
t = 0
v = 0
setup do
title "Ballerina"
smoothing true
framerate 60
end
update do
@nasser
nasser / wormsign.rb
Created December 18, 2010 05:35
Undulating worm/3D effect Sketch
t = 0
setup do
# smoothing true
alpha_blending true
circle_resolution 64
background 0
title "Wormsign"
framerate 60
width 500
@nasser
nasser / brownian.rb
Created December 18, 2010 05:36
Brownian motion sketch
num = 2000
range = 6
a = []
setup do
size 420, 500
title "Brownian"
a << Point.new(width/2, height/2)
end
@nasser
nasser / ballerina.rb
Created December 18, 2010 05:37
Zajal Sketchbook
t = 0
v = 0
setup do
title "Ballerina"
smoothing true
framerate 60
end
update do
@nasser
nasser / gist:806787
Created February 1, 2011 21:59
zajal top level local ambiguity
k = 0
def add_and_double k, m
k += m
return k * 2
end
draw do
text add_and_double(5, 7)
end
# http://www.openprocessing.org/visuals/?visualID=2097
s = 500
x0, y0 = 0.0, 0.0
setup do
alpha_blending true
background :black
color :white, 100
end
@nasser
nasser / avsys.rb
Created May 18, 2011 17:03
avsys final source code
require 'osc-ruby'
include OSC
client = OSC::Client.new( 'localhost', 12000 )
synthid = 2
graphs = []
colors = [:red, :blue, :green, :white, :red]
ard = Arduino.new
"gcc -o conftest -I. -I/Users/nasser/Workspace/librbx/rubinius/vm/capi/include -I. -ggdb3 -O2 -fPIC conftest.c -L. -L/Users/nasser/Workspace/librbx/rubinius/lib -Wl,--whole-archive -lrubinius-static -Wl,--no-whole-archive -Wl,--start-group -lstdc++ -lm -L/usr/local/lib -L/opt/local/lib -ldl -lpthread -L/Users/nasser/Workspace/librbx/rubinius/vm/external_libs/llvm/Release/lib -lpthread -lm -lLLVMMCDisassembler -lLLVMLinker -lLLVMipo -lLLVMInterpreter -lLLVMInstrumentation -lLLVMJIT -lLLVMExecutionEngine -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMX86AsmPrinter -lLLVMX86Info -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAsmParser -lLLVMArchive -lLLVMBitReader -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lrt -lcrypt -Wl,--end-group -lrt -lcrypt"