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
p = 1 - i / min_history.to_f |
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
class Particle | |
attr_accessor :x, :y | |
attr_accessor :fx, :fy | |
attr_accessor :history | |
attr_accessor :lifespan | |
def initialize x, y | |
@x = x | |
@y = 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
t = 0 | |
v = 0 | |
setup do | |
title "Ballerina" | |
smoothing true | |
framerate 60 | |
end | |
update do |
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
t = 0 | |
setup do | |
# smoothing true | |
alpha_blending true | |
circle_resolution 64 | |
background 0 | |
title "Wormsign" | |
framerate 60 | |
width 500 |
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
num = 2000 | |
range = 6 | |
a = [] | |
setup do | |
size 420, 500 | |
title "Brownian" | |
a << Point.new(width/2, height/2) | |
end |
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
t = 0 | |
v = 0 | |
setup do | |
title "Ballerina" | |
smoothing true | |
framerate 60 | |
end | |
update do |
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
k = 0 | |
def add_and_double k, m | |
k += m | |
return k * 2 | |
end | |
draw do | |
text add_and_double(5, 7) | |
end |
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
# 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 |
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
require 'osc-ruby' | |
include OSC | |
client = OSC::Client.new( 'localhost', 12000 ) | |
synthid = 2 | |
graphs = [] | |
colors = [:red, :blue, :green, :white, :red] | |
ard = Arduino.new |
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
"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" |
OlderNewer