See source code You will need maven to build (no other dependencies)
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
java_import 'java.util.ArrayList' | |
java_import 'processing.core.PVector' | |
class VectorList | |
attr_reader :list | |
def initialize |
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
# frozen_string_literal: true | |
require 'picrate' | |
class DeJongAttractor < Processing::App | |
B = -2.3 | |
attr_reader :x, :y, :xn, :yn, :timer | |
def settings | |
size(450, 450) |
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 TwoColorRule | |
attr_reader :rule, :colors | |
def initialize(number:, colors:) | |
@colors = colors | |
@rule = create_rule_from_int(number) | |
end | |
def apply_rule(input) | |
input.each_cons(3) do |triple| | |
left, center, right = *triple |
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 'erb' | |
shadertoy = File.read(ARGV[0]) | |
def shader_template | |
%( | |
#ifdef GL_ES | |
precision mediump float; | |
precision mediump int; | |
#endif |
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
/* | |
* VLCJVideo | |
* VLCJ binding for Processing. | |
* http://github.com/linux-man/VLCJVideo | |
* | |
* Copyright (C) 2020 Caldas Lopes http://softlab.pt | |
* | |
* This library is free software: you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License as | |
* published by the Free Software Foundation, either version 3 of |
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
/* | |
* VLCJVideo | |
* VLCJ binding for Processing. | |
* http://github.com/linux-man/VLCJVideo | |
* | |
* Copyright (C) 2020 Caldas Lopes http://softlab.pt | |
* | |
* This library is free software: you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License as | |
* published by the Free Software Foundation, either version 3 of |
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
# frozen_string_literal: true | |
require 'picrate' | |
# Gravitational Attraction (3D) | |
# by Daniel Shiffman. | |
# Simulating gravitational attraction | |
# G ---> universal gravitational constant | |
# m1 --> mass of object #1 | |
# m2 --> mass of object #2 | |
# d ---> distance between objects |
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
# frozen_string_literal: true | |
require 'picrate' | |
# Example of a grid of decagons with perlin noise after Lenny Herzog | |
class DecagonGrid < Processing::App | |
load_library :pdf | |
NOISE_STRENGTH = 80.0 | |
THETA = 36 | |
attr_reader :version, :save, :noise_generator |
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
# frozen_string_literal: true | |
require 'picrate' | |
require 'geomerative' | |
# SolidText sketch, rubyists hate explicit get and set methods, using | |
# JRuby convention to replace them | |
class SolidText < Processing::App | |
attr_reader :em |
NewerOlder