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
""" | |
elegant_ball.py | |
Another opengl sketch from lazydog translated to pyprocessing by monkstone. | |
http://lazydog-bookfragments.blogspot.com/2009/05/final-version-of-ball-of | |
-confusion-for.html | |
""" | |
from pyprocessing import * | |
from math import pi, sqrt, sin |
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
axiom = 'baa[a]aaaa' | |
IGNORE='[]' | |
RULES = { | |
'b': 'a', | |
'b<a': 'b' | |
} | |
LEFT = -1 | |
RIGHT = 1 |
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
/** | |
* Copyright John E. Lloyd, 2004. All rights reserved. Permission to use, | |
* copy, modify and redistribute is granted, provided that this copyright | |
* notice is retained and the author is given credit whenever appropriate. | |
* | |
* This software is distributed "as is", without any warranty, including | |
* any implied warranty of merchantability or fitness for a particular | |
* use. The author assumes no responsibility for, and shall not be liable | |
* for, any special, indirect, or consequential damages, or any damages | |
* whatsoever, arising out of or in connection with the use of this |
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/grammar.rb | |
# Non-stochastic grammar | |
# with unique premise/rules | |
############################################################ | |
class Grammar | |
attr_accessor :axiom, :rules | |
def initialize axiom | |
@axiom = axiom |
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
/** | |
* Copyright (c) 2011 Martin Prout | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. | |
* | |
* http://creativecommons.org/licenses/LGPL/2.1/ | |
* |
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
class Rod_Hilbert < Processing::App | |
#full_screen # NB: All distances are relative to screen height | |
load_libraries 'grammar', 'lut' | |
import 'lut' | |
attr_reader :grammar, :production, :distance, :depth, :centre_adjust | |
# some lsystem constants | |
CENTER_ADJUST = [0, 0.5, 1.5, 3.5, 7.5] | |
XPOS = 0 |
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
############################ | |
# Non-stochastic grammar | |
# with unique premise/rules | |
############################ | |
class Grammar | |
attr_accessor :axiom, :rules | |
def initialize axiom | |
@axiom = axiom | |
@rules = Hash.new |
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
<#assign licenseFirst = "/*"> | |
<#assign licensePrefix = " * "> | |
<#assign licenseLast = " */"> | |
<#include "../Licenses/license-${project.license}.txt"> | |
import processing.core.*; | |
/** | |
* | |
* @author ${user} |
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
<#assign licenseFirst = "/*"> | |
<#assign licensePrefix = " * "> | |
<#assign licenseLast = " */"> | |
<#include "../Licenses/license-${project.license}.txt"> | |
<#if package?? && package != ""> | |
package ${package}; | |
</#if> | |
/** |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE attributes PUBLIC "-//NetBeans//DTD DefaultAttributes 1.0//EN" "http://www.netbeans.org/dtds/attributes-1_0.dtd"> | |
<attributes version="1.0"> | |
<fileobject name="P5Library.java"> | |
<attr name="SystemFileSystem.icon" urlvalue="File:///home/tux/.netbeans/7.4/config/Templates/processing.png"/> | |
<attr name="displayName" stringvalue="Java P5Library"/> | |
<attr name="javax.script.ScriptEngine" stringvalue="freemarker"/> | |
<attr name="template" boolvalue="true"/> | |
</fileobject> | |
<fileobject name="P5Main.java"> |