This file contains hidden or 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 'ruby-processing' | |
class TextBreakingUp < Processing::App | |
attr_accessor :sentence, :message | |
def setup | |
size 260, 200 | |
fill 0 | |
text_align LEFT | |
text_font create_font("Arial", 20, true) | |
@sentence = "click mouse to shake it up" |
This file contains hidden or 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
######################################################## | |
# stochastic_test.rb | |
# | |
# Lindenmayer System in ruby-processing by Martin Prout | |
######################################################## | |
require 'stochastic_plant' | |
class Stochastic_Test < Processing::App | |
attr_reader :stochastic, :stochastic1, :stochastic2 |
This file contains hidden or 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
load_library 'context_free' | |
def setup_the_spiral | |
@spiral= ContextFree.define do | |
############ Begin defining custom terminal, an isoceles triangle | |
class << self | |
define_method(:isoceles) do |some_options| # isoceles triangle | |
size, options = *self.get_shape_values(some_options) | |
rot = options[:rotation] | |
@app.rotate(rot) if rot |
This file contains hidden or 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
# A colorful animation of default.es | |
# the StructureSynth default script with wheel zoom feature | |
load_libraries :test_free | |
full_screen | |
attr_reader :xrot, :yrot, :zrot, :wheel, :col | |
def setup_the_spiral |
This file contains hidden or 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
# hair.rb NB: run this script directly with jruby | |
require 'library/sunflow_api/library/sunflow_api.jar' | |
require 'library/sunflow/library/sunflow.jar' | |
require 'library/sunflow/library/janino.jar' | |
class BasicHair | |
API = Java::Com::briansteen::SunflowAPIAPI | |
SMath = Java::Org::sunflow::math |
This file contains hidden or 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
# asynchronous_object.rb | |
# | |
# Copyright © 2009 Preston Lee. All rights reserved. | |
require 'thread' | |
class AsychronousObject | |
attr_reader :thread | |
attr_reader :update_frequency |
This file contains hidden or 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
load_libraries :mesh, :control_panel | |
import 'megamu.mesh.Voronoi' | |
attr_reader :voronoi, :img, :pixels, :ready, :upper, :show, :points, :xr, :yr, :lower, :lowskip, :highskip | |
def setup | |
size 500, 500 | |
frame_rate 10 | |
file = select_input "Choose Image File" | |
@img = load_image file |
This file contains hidden or 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
############################################################# | |
# library/grammar.rb | |
# Non-stochastic grammar | |
# with unique premise/rules | |
############################################################ | |
class Grammar | |
attr_accessor :axiom, :rules | |
def initialize axiom | |
@axiom = axiom |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
// This is a recorded macro. First, check over the | |
// commands to make sure this is what you intended. Then, | |
// save this buffer, and the macro should appear in the | |
// Macros menu. | |
new console.commando.CommandoDialog(view,"commando.PYP5"); |
OlderNewer