ruby-processing 1.0.11 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.travis.yml +6 -0
- data/.yardopts +5 -0
- data/CHANGELOG +81 -0
- data/CONTRIBUTING.md +33 -0
- data/Gemfile +6 -0
- data/{LICENSE → LICENSE.md} +6 -4
- data/README.md +114 -0
- data/Rakefile +37 -0
- data/bin/install_jruby_complete +13 -0
- data/lib/ruby-processing.rb +3 -10
- data/lib/ruby-processing/app.rb +92 -137
- data/lib/ruby-processing/config.rb +14 -3
- data/lib/ruby-processing/exporters/application_exporter.rb +9 -5
- data/lib/ruby-processing/exporters/base_exporter.rb +3 -3
- data/lib/ruby-processing/exporters/creator.rb +4 -4
- data/lib/ruby-processing/exporters/exporters.rb +7 -0
- data/lib/ruby-processing/helper_methods.rb +18 -7
- data/lib/ruby-processing/library_loader.rb +17 -16
- data/lib/ruby-processing/runner.rb +38 -34
- data/lib/ruby-processing/runners/base.rb +1 -13
- data/lib/ruby-processing/runners/run.rb +2 -1
- data/lib/ruby-processing/runners/watch.rb +1 -1
- data/lib/ruby-processing/version.rb +3 -0
- data/lib/templates/application/Contents/Info.plist.erb +2 -2
- data/lib/templates/application/lib/args.txt.erb +1 -1
- data/lib/templates/application/run.erb +2 -1
- data/lib/templates/create/blank_sketch.rb.erb +4 -12
- data/lib/templates/create/p3d_sketch.rb.erb +7 -0
- data/library/boids/boids.rb +76 -58
- data/library/control_panel/control_panel.rb +21 -18
- data/library/file_chooser/file_chooser.rb +90 -0
- data/library/vecmath/vecmath.rb +323 -0
- data/ruby-processing.gemspec +54 -0
- data/samples/contributed/animator.rb +9 -4
- data/samples/contributed/bezier_playground.rb +178 -184
- data/samples/contributed/circle_collision.rb +164 -171
- data/samples/contributed/drawolver.rb +111 -162
- data/samples/contributed/empathy.rb +14 -12
- data/samples/contributed/fern.rb +1 -1
- data/samples/contributed/fibonacci_sphere.rb +125 -0
- data/samples/contributed/flight_patterns.rb +7 -14
- data/samples/contributed/full_screen.rb +4 -6
- data/samples/contributed/grapher.rb +35 -0
- data/samples/contributed/gravity.rb +22 -24
- data/samples/contributed/jwishy.rb +75 -63
- data/samples/contributed/mandelbrot.rb +82 -0
- data/samples/contributed/orbit.rb +5 -4
- data/samples/contributed/pong.rb +152 -150
- data/samples/contributed/quadraticvertex.rb +98 -0
- data/samples/contributed/re_sample.rb +27 -0
- data/samples/contributed/simple_buffer.rb +38 -43
- data/samples/contributed/tree.rb +63 -70
- data/samples/external_library/java_processing/README +3 -0
- data/samples/external_library/java_processing/fisica/README +1 -0
- data/samples/external_library/java_processing/fisica/bubbles.rb +80 -0
- data/samples/external_library/java_processing/fisica/joints.rb +112 -0
- data/samples/external_library/java_processing/fisica/polygons.rb +79 -0
- data/samples/external_library/java_processing/fisica/raycast.rb +61 -0
- data/samples/external_library/java_processing/generative_design/mesh_example.rb +25 -0
- data/samples/external_library/java_processing/generative_design/node_spring_attractor.rb +83 -0
- data/samples/external_library/java_processing/generative_design/sub_class_example.rb +44 -0
- data/samples/external_library/java_processing/geomerative/data/FreeSans.ttf +0 -0
- data/samples/external_library/java_processing/geomerative/data/Toucan.svg +43 -0
- data/samples/external_library/java_processing/geomerative/hello_bot_ignore_styles.rb +38 -0
- data/samples/external_library/java_processing/geomerative/hello_world_rotate_firstletter.rb +43 -0
- data/samples/external_library/java_processing/geomerative/hola_mundo.rb +37 -0
- data/samples/external_library/java_processing/grafica/data/OktoberfestVSGermanElections.csv +118 -0
- data/samples/external_library/java_processing/grafica/default_plot.rb +30 -0
- data/samples/external_library/java_processing/grafica/multiple_panels.rb +117 -0
- data/samples/external_library/java_processing/grafica/oktoberfest_example.rb +83 -0
- data/samples/external_library/java_processing/hemesh/data/java_args.txt +2 -0
- data/samples/external_library/java_processing/hemesh/library/vbo/mesh_to_vbo.rb +43 -0
- data/samples/external_library/java_processing/hemesh/twin_iso.rb +71 -0
- data/samples/external_library/java_processing/pbox2d/bumpy_surface_noise.rb +57 -0
- data/samples/external_library/java_processing/pbox2d/contact_test.rb +23 -0
- data/samples/external_library/java_processing/pbox2d/data/java_args.txt +2 -0
- data/samples/external_library/java_processing/pbox2d/library/custom_shape/custom_shape.rb +158 -0
- data/samples/external_library/java_processing/pbox2d/library/particle_system/particle_system.rb +212 -0
- data/samples/external_library/java_processing/pbox2d/library/surface/surface.rb +154 -0
- data/samples/external_library/java_processing/pbox2d/liquidy.rb +58 -0
- data/samples/external_library/java_processing/pbox2d/polygons.rb +58 -0
- data/samples/{peasy_cam → external_library/java_processing/peasy_cam}/hello_peasy.rb +4 -4
- data/samples/external_library/java_processing/peasy_cam/hilbert_fractal.rb +34 -0
- data/samples/{peasy_cam → external_library/java_processing/peasy_cam}/library/hilbert/hilbert.rb +1 -1
- data/samples/external_library/java_processing/proscene/cad_camera.rb +57 -0
- data/samples/external_library/java_processing/proscene/camera_customization.rb +114 -0
- data/samples/external_library/java_processing/proscene/data/ti_yong.png +0 -0
- data/samples/external_library/java_processing/toxiclibs/data/ti_yong.png +0 -0
- data/samples/external_library/java_processing/toxiclibs/gray_scott_image.rb +79 -0
- data/samples/external_library/java_processing/toxiclibs/gray_scott_tone_map.rb +78 -0
- data/samples/external_library/java_processing/toxiclibs/implicit.rb +143 -0
- data/samples/external_library/java_processing/toxiclibs/library/vbo/mesh_to_vbo.rb +52 -0
- data/samples/external_library/java_processing/toxiclibs/model_align.rb +55 -0
- data/samples/external_library/ruby_gem/README +12 -0
- data/samples/external_library/ruby_gem/data/README.txt +1 -0
- data/samples/external_library/ruby_gem/data/java_args.txt +2 -0
- data/samples/external_library/ruby_gem/game_of_life.rb +127 -0
- data/samples/external_library/ruby_gem/mdarray_test.rb +28 -0
- data/samples/processing_app/basics/arrays/array.rb +23 -29
- data/samples/processing_app/basics/arrays/array_2d.rb +22 -28
- data/samples/processing_app/basics/arrays/array_objects.rb +50 -55
- data/samples/processing_app/basics/camera/move_eye.rb +24 -0
- data/samples/processing_app/{3D → basics}/camera/perspective.rb +0 -0
- data/samples/processing_app/basics/color/brightness.rb +15 -21
- data/samples/processing_app/basics/color/color_wheel.rb +72 -79
- data/samples/processing_app/basics/color/creating.rb +35 -24
- data/samples/processing_app/basics/color/hue.rb +16 -22
- data/samples/processing_app/basics/color/linear_gradient.rb +35 -40
- data/samples/processing_app/basics/color/radial_gradient.rb +26 -34
- data/samples/processing_app/basics/color/reading/reading.rb +2 -7
- data/samples/processing_app/basics/color/relativity.rb +19 -32
- data/samples/processing_app/basics/color/saturation.rb +15 -26
- data/samples/processing_app/basics/color/wave_gradient.rb +25 -36
- data/samples/processing_app/basics/control/conditionals1.rb +20 -25
- data/samples/processing_app/basics/control/conditionals2.rb +27 -32
- data/samples/processing_app/basics/control/embedded_iteration.rb +25 -33
- data/samples/processing_app/basics/control/iteration.rb +43 -54
- data/samples/processing_app/basics/control/logical_operators.rb +45 -48
- data/samples/processing_app/basics/data/characters_strings.rb +50 -0
- data/samples/processing_app/basics/data/datatype_conversion.rb +28 -32
- data/samples/processing_app/basics/data/integers_floats.rb +18 -24
- data/samples/processing_app/basics/data/true_false.rb +19 -25
- data/samples/processing_app/basics/data/variable_scope.rb +51 -57
- data/samples/processing_app/basics/data/variables.rb +27 -32
- data/samples/processing_app/basics/form/bezier.rb +11 -14
- data/samples/processing_app/basics/form/bezier_ellipse.rb +79 -90
- data/samples/processing_app/basics/form/brick_tower.rb +92 -0
- data/samples/processing_app/basics/form/cubic_grid.rb +39 -0
- data/samples/processing_app/{3D → basics}/form/icosahedra/icosahedra.rb +32 -36
- data/samples/processing_app/{3D → basics}/form/icosahedra/icosahedron.rb +1 -1
- data/samples/processing_app/{3D → basics}/form/icosahedra/shape_3D.rb +0 -0
- data/samples/processing_app/basics/form/pie_chart.rb +17 -21
- data/samples/processing_app/basics/form/points_lines.rb +11 -16
- data/samples/processing_app/{3D → basics}/form/primitives.rb +11 -25
- data/samples/processing_app/basics/form/regular_polygon.rb +46 -0
- data/samples/processing_app/basics/form/rgb_cube.rb +68 -0
- data/samples/processing_app/basics/form/shape_primitives.rb +15 -17
- data/samples/processing_app/basics/form/shape_transform.rb +88 -0
- data/samples/processing_app/basics/form/star.rb +48 -0
- data/samples/processing_app/basics/form/toroid.rb +127 -0
- data/samples/processing_app/basics/form/triangle_strip.rb +29 -33
- data/samples/processing_app/basics/form/vertices.rb +36 -40
- data/samples/processing_app/basics/image/alphamask.rb +10 -16
- data/samples/processing_app/basics/image/background_image.rb +16 -22
- data/samples/processing_app/basics/image/create_image.rb +10 -16
- data/samples/processing_app/{3D → basics}/image/data/ystone08.jpg +0 -0
- data/samples/processing_app/basics/image/extrusion.rb +46 -0
- data/samples/processing_app/basics/image/load_display_image.rb +12 -19
- data/samples/processing_app/basics/image/pointillism.rb +13 -19
- data/samples/processing_app/basics/image/request_image.rb +41 -50
- data/samples/processing_app/basics/image/sprite.rb +19 -25
- data/samples/processing_app/basics/image/transparency.rb +14 -20
- data/samples/processing_app/basics/image/zoom.rb +59 -0
- data/samples/processing_app/basics/input/clock.rb +32 -38
- data/samples/processing_app/basics/input/constrain.rb +25 -31
- data/samples/processing_app/basics/input/easing.rb +18 -20
- data/samples/processing_app/basics/input/keyboard.rb +16 -22
- data/samples/processing_app/basics/input/keyboard_functions.rb +49 -68
- data/samples/processing_app/basics/input/milliseconds.rb +11 -16
- data/samples/processing_app/basics/input/mouse_1d.rb +19 -26
- data/samples/processing_app/basics/input/mouse_2d.rb +14 -20
- data/samples/processing_app/basics/input/mouse_functions.rb +56 -61
- data/samples/processing_app/basics/input/mouse_press.rb +9 -15
- data/samples/processing_app/basics/input/mouse_signals.rb +29 -34
- data/samples/processing_app/basics/input/storing_input.rb +28 -29
- data/samples/processing_app/basics/lights/directional.rb +37 -0
- data/samples/processing_app/basics/lights/lights1.rb +35 -0
- data/samples/processing_app/basics/lights/lights2.rb +38 -0
- data/samples/processing_app/basics/lights/reflection.rb +35 -0
- data/samples/processing_app/basics/lights/spot.rb +36 -0
- data/samples/processing_app/basics/math/additive_wave.rb +51 -53
- data/samples/processing_app/basics/math/arctangent.rb +34 -44
- data/samples/processing_app/basics/math/distance1.rb +44 -50
- data/samples/processing_app/basics/math/distance2.rb +14 -30
- data/samples/processing_app/basics/math/double_random.rb +23 -30
- data/samples/processing_app/basics/math/graphing_2_d_equation.rb +30 -44
- data/samples/processing_app/basics/math/increment_decrement.rb +37 -42
- data/samples/processing_app/basics/math/interpolate.rb +34 -0
- data/samples/processing_app/basics/math/modulo.rb +25 -29
- data/samples/processing_app/basics/math/noise_1_d.rb +14 -30
- data/samples/processing_app/basics/math/noise_2_d.rb +22 -39
- data/samples/processing_app/basics/math/noise_3_d.rb +24 -44
- data/samples/processing_app/basics/math/noise_wave.rb +35 -55
- data/samples/processing_app/basics/math/operator_precedence.rb +24 -45
- data/samples/processing_app/basics/math/polar_to_cartesian.rb +22 -35
- data/samples/processing_app/basics/math/random.rb +13 -27
- data/samples/processing_app/basics/math/random_gaussian.rb +23 -0
- data/samples/processing_app/basics/math/sine.rb +27 -41
- data/samples/processing_app/basics/math/sine_cosine.rb +37 -49
- data/samples/processing_app/basics/math/sine_wave.rb +33 -52
- data/samples/processing_app/basics/objects/composite_objects.rb +94 -120
- data/samples/processing_app/basics/objects/inheritance.rb +64 -86
- data/samples/processing_app/basics/objects/multiple_constructors.rb +25 -38
- data/samples/processing_app/basics/objects/objects.rb +42 -57
- data/samples/processing_app/basics/shape/data/rocket.mtl +8 -0
- data/samples/processing_app/basics/shape/data/rocket.obj +1688 -0
- data/samples/processing_app/basics/shape/data/rocket.png +0 -0
- data/samples/processing_app/basics/shape/disable_style.rb +21 -25
- data/samples/processing_app/basics/shape/get_child.rb +27 -30
- data/samples/processing_app/basics/shape/load_display_obj.rb +25 -0
- data/samples/processing_app/basics/shape/load_display_shape.rb +10 -23
- data/samples/processing_app/basics/shape/load_display_svg.rb +22 -0
- data/samples/processing_app/basics/shape/scale_shape.rb +13 -23
- data/samples/processing_app/basics/structure/coordinates.rb +12 -25
- data/samples/processing_app/basics/structure/create_graphics.rb +18 -28
- data/samples/processing_app/basics/structure/functions.rb +19 -31
- data/samples/processing_app/basics/structure/loop.rb +21 -35
- data/samples/processing_app/basics/structure/noloop.rb +13 -25
- data/samples/processing_app/basics/structure/recursion1.rb +18 -33
- data/samples/processing_app/basics/structure/recursion2.rb +18 -34
- data/samples/processing_app/basics/structure/redraw.rb +16 -27
- data/samples/processing_app/basics/structure/setup_draw.rb +11 -22
- data/samples/processing_app/basics/structure/statements_comments.rb +7 -13
- data/samples/processing_app/basics/structure/width_height.rb +7 -14
- data/samples/processing_app/{3D → basics}/textures/data/berlin-1.jpg +0 -0
- data/samples/processing_app/basics/textures/texture1.rb +28 -0
- data/samples/processing_app/basics/textures/texture2.rb +33 -0
- data/samples/processing_app/basics/textures/texture3.rb +64 -0
- data/samples/processing_app/basics/textures/texture_cube.rb +86 -0
- data/samples/processing_app/basics/transform/arm.rb +22 -37
- data/samples/processing_app/basics/transform/bird.rb +57 -0
- data/samples/processing_app/basics/transform/birds.rb +38 -0
- data/samples/processing_app/basics/transform/cubes_in_cube.rb +99 -0
- data/samples/processing_app/{3D/transform/birds → basics/transform/library/bird}/bird.rb +0 -0
- data/samples/processing_app/{3D/transform/cubes_in_cube → basics/transform/library/cube}/cube.rb +10 -12
- data/samples/processing_app/basics/transform/rotate.rb +17 -31
- data/samples/processing_app/basics/transform/rotate1.rb +27 -0
- data/samples/processing_app/basics/transform/rotate_push_pop.rb +35 -0
- data/samples/processing_app/basics/transform/rotate_x_y.rb +36 -0
- data/samples/processing_app/basics/transform/scale.rb +19 -35
- data/samples/processing_app/basics/transform/translate.rb +18 -32
- data/samples/processing_app/basics/transform/triangle_flower.rb +38 -55
- data/samples/processing_app/{3D → basics}/typography/data/Univers45.vlw +0 -0
- data/samples/processing_app/{3D → basics}/typography/kinetic_type.rb +1 -5
- data/samples/processing_app/basics/typography/letters.rb +26 -44
- data/samples/processing_app/basics/typography/words.rb +29 -30
- data/samples/processing_app/basics/web/embedded_links.rb +39 -45
- data/samples/processing_app/basics/web/loading_images.rb +6 -16
- data/samples/processing_app/demos/graphics/bezier_patch.rb +227 -0
- data/samples/processing_app/demos/graphics/data/frag.glsl +30 -0
- data/samples/processing_app/demos/graphics/data/java_args.txt +2 -0
- data/samples/processing_app/demos/graphics/data/mercury.jpg +0 -0
- data/samples/processing_app/demos/graphics/data/planet.jpg +0 -0
- data/samples/processing_app/demos/graphics/data/starfield.jpg +0 -0
- data/samples/processing_app/demos/graphics/data/sun.jpg +0 -0
- data/samples/processing_app/demos/graphics/data/vert.glsl +31 -0
- data/samples/processing_app/demos/graphics/low_level_gl.rb +72 -0
- data/samples/processing_app/demos/graphics/planets.rb +51 -0
- data/samples/processing_app/demos/graphics/trefoil.rb +142 -0
- data/samples/processing_app/demos/graphics/wiggling.rb +289 -0
- data/samples/processing_app/demos/performance/cubic_grid_retained.rb +58 -0
- data/samples/processing_app/demos/performance/data/java_args.txt +1 -0
- data/samples/processing_app/demos/performance/esfera.rb +105 -0
- data/samples/processing_app/demos/performance/text_rendering.rb +14 -0
- data/samples/processing_app/demos/tests/no_background_test.rb +10 -0
- data/samples/processing_app/demos/tests/offscreen_test.rb +34 -0
- data/samples/processing_app/demos/tests/redraw_test.rb +14 -0
- data/samples/processing_app/demos/tests/resize_test.rb +10 -0
- data/samples/processing_app/demos/tests/restart_test.rb +22 -0
- data/samples/processing_app/demos/tests/smooth_test.rb +27 -0
- data/samples/processing_app/demos/tests/specs_test.rb +11 -0
- data/samples/processing_app/library/dxf/simple_export.rb +48 -0
- data/samples/processing_app/library/file_chooser/image_viewer.rb +24 -0
- data/samples/processing_app/library/minim/filter_example.rb +65 -0
- data/samples/processing_app/library/minim/frequency_modulation.rb +64 -0
- data/samples/processing_app/library/minim/sequence_sound.rb +59 -0
- data/samples/processing_app/library/minim/synthesize_sound.rb +35 -0
- data/samples/processing_app/library/movie/README +1 -0
- data/samples/processing_app/library/movie/data/transit.mkv +0 -0
- data/samples/processing_app/library/movie/data/transit.mov +0 -0
- data/samples/processing_app/library/movie/loop.rb +24 -0
- data/samples/processing_app/library/movie/pixelate.rb +50 -0
- data/samples/processing_app/library/movie/reverse.rb +47 -0
- data/samples/processing_app/library/movie/scratch.rb +36 -0
- data/samples/processing_app/library/movie/speed.rb +33 -0
- data/samples/processing_app/library/net/HTTPClient.rb +31 -0
- data/samples/processing_app/library/pdf/.gitignore +1 -0
- data/samples/processing_app/library/pdf/complex_3D.rb +160 -0
- data/samples/processing_app/library/pdf/large_page.rb +25 -0
- data/samples/processing_app/library/pdf/many_frames.rb +33 -0
- data/samples/processing_app/library/pdf/many_pages.rb +31 -0
- data/samples/processing_app/library/pdf/many_pdfs.rb +37 -0
- data/samples/processing_app/library/pdf/one_frame.rb +19 -0
- data/samples/processing_app/library/vecmath/README.txt +2 -0
- data/samples/processing_app/library/vecmath/acceleration_with_vectors.rb +75 -0
- data/samples/processing_app/library/vecmath/bouncing_ball.rb +51 -0
- data/samples/processing_app/library/vecmath/circle_collision.rb +174 -0
- data/samples/processing_app/library/vecmath/data/java_args.txt +2 -0
- data/samples/processing_app/library/vecmath/data/sprite.png +0 -0
- data/samples/processing_app/library/vecmath/data/texture.png +0 -0
- data/samples/processing_app/library/vecmath/drawolver.rb +111 -0
- data/samples/processing_app/library/vecmath/flocking.rb +33 -0
- data/samples/processing_app/library/vecmath/hilbert_fractal.rb +65 -0
- data/samples/processing_app/library/vecmath/library/flock/flock.rb +214 -0
- data/samples/processing_app/library/vecmath/library/hilbert/hilbert.rb +84 -0
- data/samples/processing_app/library/vecmath/library/particle/particle_system.rb +106 -0
- data/samples/processing_app/library/vecmath/library/wiggler/wiggler.rb +58 -0
- data/samples/processing_app/library/vecmath/morph.rb +86 -0
- data/samples/processing_app/library/vecmath/multiple_particle_systems.rb +158 -0
- data/samples/processing_app/library/vecmath/particle_system_pshape.rb +38 -0
- data/samples/processing_app/library/vecmath/reflection1.rb +108 -0
- data/samples/processing_app/library/vecmath/retained_menger.rb +150 -0
- data/samples/processing_app/library/vecmath/retained_test.rb +65 -0
- data/samples/processing_app/library/vecmath/retained_test2.rb +65 -0
- data/samples/processing_app/library/vecmath/simple_particle_system.rb +89 -0
- data/samples/processing_app/library/vecmath/smoke_particle_system.rb +138 -0
- data/samples/processing_app/library/vecmath/vector_math.rb +39 -0
- data/samples/processing_app/library/vecmath/wiggle_pshape.rb +22 -0
- data/samples/processing_app/topics/advanced_data/README +1 -0
- data/samples/processing_app/topics/advanced_data/counting_words.rb +79 -0
- data/samples/processing_app/topics/advanced_data/data/Georgia.ttf +0 -0
- data/samples/processing_app/topics/advanced_data/data/Merriweather-Light.ttf +0 -0
- data/samples/processing_app/topics/advanced_data/data/a000 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a001 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a002 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a003 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a004 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a005 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a006 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a007 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a008 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a009 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a010 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a011 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a012 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a013 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a014 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a015 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a016 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a017 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a018 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a019 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a020 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a021 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a022 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a023 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a024 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a025 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a026 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a027 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a028 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a029 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a030 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a031 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a032 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a033 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a034 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a035 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a036 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a037 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a038 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a039 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a040 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a041 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a042 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a043 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a044 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a045 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a046 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a047 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a048 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a049 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a050 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a051 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a052 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a053 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a054 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a055 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a056 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a057 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a058 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a059 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a060 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a061 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a062 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a063 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a064 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a065 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a066 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a067 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a068 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a069 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a070 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a071 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a072 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a073 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a074 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a075 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a076 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a077 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a078 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a079 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a080 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a081 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a082 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a083 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a084 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a085 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a086 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a087 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a088 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a089 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a090 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a091 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a092 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a093 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a094 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a095 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a096 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a097 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a098 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a099 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a100 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a101 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a102 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a103 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a104 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a105 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a106 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a107 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a108 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a109 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a110 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a111 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a112 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a113 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a114 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/a115 copy.jpg +0 -0
- data/samples/processing_app/topics/advanced_data/data/data.csv +5 -0
- data/samples/processing_app/topics/advanced_data/data/data.json +36 -0
- data/samples/processing_app/topics/advanced_data/data/data.xml +38 -0
- data/samples/processing_app/topics/advanced_data/data/data.yml +22 -0
- data/samples/processing_app/topics/advanced_data/data/dracula.txt +16624 -0
- data/samples/processing_app/topics/advanced_data/data/frankenstein.txt +7652 -0
- data/samples/processing_app/topics/advanced_data/data/struct_data.yml +22 -0
- data/samples/processing_app/topics/advanced_data/library/bubble/bubble.rb +45 -0
- data/samples/processing_app/topics/advanced_data/library/word/word.rb +64 -0
- data/samples/processing_app/topics/advanced_data/load_save_XML.rb +114 -0
- data/samples/processing_app/topics/advanced_data/load_save_json.rb +93 -0
- data/samples/processing_app/topics/advanced_data/load_save_struct_yaml.rb +85 -0
- data/samples/processing_app/topics/advanced_data/load_save_table.rb +85 -0
- data/samples/processing_app/topics/advanced_data/load_save_yaml.rb +89 -0
- data/samples/processing_app/topics/advanced_data/regex.rb +47 -0
- data/samples/processing_app/topics/advanced_data/threads.rb +96 -0
- data/samples/processing_app/topics/advanced_data/threads_two.rb +52 -0
- data/samples/processing_app/topics/advanced_data/word_frequency.rb +78 -0
- data/samples/processing_app/topics/advanced_data/yahoo_weather.rb +38 -0
- data/samples/processing_app/topics/animation/README.txt +1 -0
- data/samples/processing_app/topics/animation/animated_sprite.rb +58 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0000.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0001.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0002.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0003.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0004.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0005.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0006.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0007.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0008.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0009.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0010.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0011.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0012.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0013.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0014.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0015.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0016.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0017.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0018.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0019.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0020.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0021.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0022.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0023.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0024.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0025.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0026.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0027.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0028.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0029.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0030.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0031.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0032.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0033.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0034.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0035.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0036.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Shifty_0037.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0000.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0001.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0002.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0003.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0004.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0005.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0006.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0007.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0008.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0009.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0010.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0011.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0012.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0013.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0014.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0015.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0016.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0017.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0018.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0019.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0020.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0021.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0022.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0023.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0024.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0025.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0026.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0027.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0028.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0029.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0030.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0031.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0032.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0033.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0034.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0035.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0036.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0037.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0038.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0039.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0040.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0041.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0042.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0043.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0044.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0045.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0046.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0047.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0048.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0049.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0050.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0051.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0052.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0053.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0054.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0055.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0056.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0057.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0058.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_Teddy_0059.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0000.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0001.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0002.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0003.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0004.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0005.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0006.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0007.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0008.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0009.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0010.gif +0 -0
- data/samples/processing_app/topics/animation/data/PT_anim0011.gif +0 -0
- data/samples/processing_app/topics/animation/sequential.rb +42 -0
- data/samples/processing_app/topics/cellular_automata/game_of_life.rb +125 -0
- data/samples/processing_app/topics/cellular_automata/library/ca/ca.rb +91 -0
- data/samples/processing_app/topics/cellular_automata/library/cell/cell.rb +99 -0
- data/samples/processing_app/topics/cellular_automata/library/simple_cell/simple_cell.rb +46 -0
- data/samples/processing_app/topics/cellular_automata/spore1.rb +94 -0
- data/samples/processing_app/topics/cellular_automata/spore2.rb +101 -0
- data/samples/processing_app/topics/cellular_automata/wolfram.rb +42 -0
- data/samples/processing_app/topics/create_shapes/begin_end_contour.rb +44 -0
- data/samples/processing_app/topics/create_shapes/data/sprite.png +0 -0
- data/samples/processing_app/topics/create_shapes/group_pshape.rb +69 -0
- data/samples/processing_app/topics/create_shapes/library/particle/particle_system.rb +107 -0
- data/samples/processing_app/topics/create_shapes/library/polygon/polygon.rb +35 -0
- data/samples/processing_app/topics/create_shapes/library/star/star.rb +47 -0
- data/samples/processing_app/topics/create_shapes/library/wiggler/wiggler.rb +57 -0
- data/samples/processing_app/topics/create_shapes/particle_system_pshape.rb +38 -0
- data/samples/processing_app/topics/create_shapes/path_pshape.rb +38 -0
- data/samples/processing_app/topics/create_shapes/polygon_pshape_oo3.rb +56 -0
- data/samples/processing_app/topics/create_shapes/polygon_pshape_oop.rb +29 -0
- data/samples/processing_app/topics/create_shapes/polygon_pshape_oop2.rb +52 -0
- data/samples/processing_app/topics/create_shapes/polygon_shape.rb +42 -0
- data/samples/processing_app/topics/create_shapes/primitive_pshape.rb +29 -0
- data/samples/processing_app/topics/create_shapes/wiggle_pshape.rb +22 -0
- data/samples/processing_app/topics/drawing/continuous_lines.rb +17 -0
- data/samples/processing_app/topics/drawing/pattern.rb +30 -0
- data/samples/processing_app/topics/drawing/pulses.rb +33 -0
- data/samples/processing_app/topics/drawing/scribble_plotter.rb +77 -0
- data/samples/processing_app/topics/effects/lens.rb +68 -70
- data/samples/processing_app/topics/file_io/data/positions.txt +206 -0
- data/samples/processing_app/topics/file_io/load_file1.rb +32 -0
- data/samples/processing_app/topics/file_io/save_frames.rb +70 -0
- data/samples/processing_app/topics/file_io/save_one_image.rb +22 -0
- data/samples/processing_app/topics/file_io/tile_images.rb +37 -0
- data/samples/processing_app/topics/gui/button.rb +74 -0
- data/samples/processing_app/topics/gui/data/seedBottom.jpg +0 -0
- data/samples/processing_app/topics/gui/data/seedTop.jpg +0 -0
- data/samples/processing_app/topics/gui/handles.rb +108 -0
- data/samples/processing_app/topics/gui/rollover.rb +63 -0
- data/samples/processing_app/topics/gui/scrollbar.rb +96 -0
- data/samples/processing_app/topics/image_processing/blending.rb +82 -0
- data/samples/processing_app/topics/image_processing/blur.rb +50 -0
- data/samples/processing_app/topics/image_processing/brightness.rb +39 -0
- data/samples/processing_app/topics/image_processing/convolution.rb +72 -0
- data/samples/processing_app/{3D/image → topics/image_processing}/data/eames.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/frontier.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/java_args.txt +3 -0
- data/samples/processing_app/topics/image_processing/data/layer1.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/layer2.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/moon-wide.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/moon.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/sea.jpg +0 -0
- data/samples/processing_app/topics/image_processing/data/ystone08.jpg +0 -0
- data/samples/processing_app/topics/image_processing/edge_detection.rb +47 -0
- data/samples/processing_app/topics/image_processing/explode.rb +35 -0
- data/samples/processing_app/topics/image_processing/extrusion.rb +49 -0
- data/samples/processing_app/topics/image_processing/histogram.rb +43 -0
- data/samples/processing_app/topics/image_processing/linear_image.rb +45 -0
- data/samples/processing_app/topics/image_processing/pixel_array.rb +48 -0
- data/samples/processing_app/topics/image_processing/zoom.rb +66 -0
- data/samples/processing_app/topics/lsystems/chequer.rb +72 -0
- data/samples/processing_app/topics/lsystems/csplant.rb +100 -0
- data/samples/processing_app/topics/lsystems/cstest.rb +20 -0
- data/samples/processing_app/topics/lsystems/data/java_args.txt +3 -0
- data/samples/processing_app/topics/lsystems/david_tour.rb +77 -0
- data/samples/processing_app/topics/lsystems/koch.rb +29 -0
- data/samples/processing_app/topics/lsystems/library/cs_grammar/cs_grammar.rb +88 -0
- data/samples/processing_app/topics/lsystems/library/grammar/grammar.rb +33 -0
- data/samples/processing_app/topics/lsystems/library/koch/koch_fractal.rb +117 -0
- data/samples/processing_app/topics/lsystems/library/stochastic_grammar/stochastic_grammar.rb +58 -0
- data/samples/processing_app/topics/lsystems/mpeano.rb +83 -0
- data/samples/processing_app/topics/lsystems/peano.rb +78 -0
- data/samples/processing_app/topics/lsystems/penrose.rb +123 -0
- data/samples/processing_app/topics/lsystems/penrose_snowflake.rb +93 -0
- data/samples/processing_app/topics/lsystems/pentagonal.rb +103 -0
- data/samples/processing_app/topics/lsystems/snake_kolam.rb +93 -0
- data/samples/processing_app/topics/lsystems/stochastic_test.rb +99 -0
- data/samples/processing_app/topics/lsystems/three_d_tree.rb +108 -0
- data/samples/processing_app/topics/motion/bounce.rb +40 -0
- data/samples/processing_app/topics/motion/bouncy_bubbles.rb +96 -0
- data/samples/processing_app/topics/motion/brownian.rb +40 -0
- data/samples/processing_app/topics/motion/circle_collision.rb +185 -0
- data/samples/processing_app/topics/motion/cubes_in_cube.rb +64 -0
- data/samples/processing_app/topics/motion/data/java_args.txt +3 -0
- data/samples/processing_app/topics/motion/library/cube/cube.rb +128 -0
- data/samples/processing_app/topics/motion/library/ground/ground.rb +42 -0
- data/samples/processing_app/topics/motion/linear.rb +25 -0
- data/samples/processing_app/topics/motion/morph.rb +84 -0
- data/samples/processing_app/topics/motion/moving_on_curves.rb +46 -0
- data/samples/processing_app/topics/motion/puff.rb +78 -0
- data/samples/processing_app/topics/motion/reflection1.rb +107 -0
- data/samples/processing_app/topics/motion/reflection2.rb +122 -0
- data/samples/processing_app/topics/shaders/README +1 -0
- data/samples/processing_app/topics/shaders/blur_filter.rb +25 -0
- data/samples/processing_app/topics/shaders/bw_shader.rb +40 -0
- data/samples/processing_app/topics/shaders/conway.rb +26 -0
- data/samples/processing_app/topics/shaders/data/GlossyFrag.glsl +44 -0
- data/samples/processing_app/topics/shaders/data/GlossyVert.glsl +33 -0
- data/samples/processing_app/topics/shaders/data/Texture01.jpg +0 -0
- data/samples/processing_app/topics/shaders/data/Texture02.jpg +0 -0
- data/samples/processing_app/topics/shaders/data/ToonFrag.glsl +25 -0
- data/samples/processing_app/topics/shaders/data/ToonVert.glsl +31 -0
- data/samples/processing_app/topics/shaders/data/blur.glsl +42 -0
- data/samples/processing_app/topics/shaders/data/bwfrag.glsl +23 -0
- data/samples/processing_app/topics/shaders/data/conway.glsl +57 -0
- data/samples/processing_app/topics/shaders/data/cubemapfrag.glsl +1 -0
- data/samples/processing_app/topics/shaders/data/cubemapvert.glsl +1 -0
- data/samples/processing_app/topics/shaders/data/deform.glsl +31 -0
- data/samples/processing_app/topics/shaders/data/displaceFrag.glsl +8 -0
- data/samples/processing_app/topics/shaders/data/displaceVert.glsl +201 -0
- data/samples/processing_app/topics/shaders/data/edges.glsl +40 -0
- data/samples/processing_app/topics/shaders/data/java_args.txt +2 -0
- data/samples/processing_app/topics/shaders/data/lachoy.jpg +0 -0
- data/samples/processing_app/topics/shaders/data/landscape.glsl +352 -0
- data/samples/processing_app/topics/shaders/data/leaves.jpg +0 -0
- data/samples/processing_app/topics/shaders/data/mask.glsl +19 -0
- data/samples/processing_app/topics/shaders/data/monjori.glsl +30 -0
- data/samples/processing_app/topics/shaders/data/nebula.glsl +111 -0
- data/samples/processing_app/topics/shaders/data/sep_blur.glsl +59 -0
- data/samples/processing_app/topics/shaders/data/tex1.jpg +0 -0
- data/samples/processing_app/topics/shaders/deform.rb +28 -0
- data/samples/processing_app/topics/shaders/dome_projection.rb +143 -0
- data/samples/processing_app/topics/shaders/edge_detect.rb +30 -0
- data/samples/processing_app/topics/shaders/glossy_fish_eye.rb +63 -0
- data/samples/processing_app/topics/shaders/glsl_heightmap_noise.rb +122 -0
- data/samples/processing_app/topics/shaders/image_mask.rb +31 -0
- data/samples/processing_app/topics/shaders/landscape.rb +32 -0
- data/samples/processing_app/topics/shaders/monjori.rb +28 -0
- data/samples/processing_app/topics/shaders/nebula.rb +18 -0
- data/samples/processing_app/topics/shaders/sep_blur.rb +64 -0
- data/samples/processing_app/topics/shaders/toon_shading.rb +43 -0
- data/samples/processing_app/topics/simulate/README +1 -0
- data/samples/processing_app/topics/simulate/chain.rb +34 -38
- data/samples/processing_app/topics/simulate/data/java_args.txt +2 -0
- data/samples/processing_app/topics/simulate/data/texture.gif +0 -0
- data/samples/processing_app/topics/simulate/data/texture.png +0 -0
- data/samples/processing_app/topics/simulate/flocking.rb +32 -0
- data/samples/processing_app/topics/simulate/library/flock/flock.rb +206 -0
- data/samples/processing_app/topics/simulate/multiple_particle_systems.rb +122 -110
- data/samples/processing_app/topics/simulate/simple_particle_system.rb +63 -86
- data/samples/processing_app/topics/simulate/smoke_particle_system.rb +136 -0
- data/samples/processing_app/topics/simulate/spring.rb +65 -69
- data/samples/processing_app/topics/simulate/springs.rb +35 -36
- data/samples/processing_app/topics/vectors/acceleration_with_vectors.rb +77 -0
- data/samples/processing_app/topics/vectors/bouncing_ball.rb +49 -0
- data/samples/processing_app/topics/vectors/vector_math.rb +38 -0
- data/test/README.md +6 -0
- data/test/basic.rb +14 -0
- data/test/draw_ex.rb +12 -0
- data/test/graphics.rb +7 -0
- data/test/p2d.rb +14 -0
- data/test/p3d.rb +14 -0
- data/test/rp5_test.rb +77 -0
- data/test/setup_ex.rb +12 -0
- data/vendors/Rakefile +36 -0
- metadata +718 -231
- data/README +0 -64
- data/lib/core/core.jar +0 -0
- data/lib/core/jruby-complete.jar +0 -0
- data/lib/ruby-processing/exporters/applet_exporter.rb +0 -78
- data/lib/templates/applet/images/built_with.jpg +0 -0
- data/lib/templates/applet/images/ruby.jpg +0 -0
- data/lib/templates/applet/images/top.png +0 -0
- data/lib/templates/applet/index.html.erb +0 -113
- data/lib/templates/applet/library/library.txt +0 -1
- data/lib/templates/create/bare_sketch.rb.erb +0 -7
- data/library/dxf/library/dxf.jar +0 -0
- data/library/dxf/library/export.txt +0 -1
- data/library/javascript/library/export.txt +0 -8
- data/library/javascript/library/javascript.jar +0 -0
- data/library/minim/library/export.txt +0 -1
- data/library/minim/library/jl1.0.jar +0 -0
- data/library/minim/library/jsminim.jar +0 -0
- data/library/minim/library/minim-spi.jar +0 -0
- data/library/minim/library/minim.jar +0 -0
- data/library/minim/library/mp3spi1.9.4.jar +0 -0
- data/library/minim/library/tritonus_aos.jar +0 -0
- data/library/minim/library/tritonus_share.jar +0 -0
- data/library/net/library/export.txt +0 -1
- data/library/net/library/net.jar +0 -0
- data/library/opengl/library/export.txt +0 -10
- data/library/opengl/library/gluegen-rt.jar +0 -0
- data/library/opengl/library/jogl.jar +0 -0
- data/library/opengl/library/linux32/libgluegen-rt.so +0 -0
- data/library/opengl/library/linux32/libjogl.so +0 -0
- data/library/opengl/library/linux32/libjogl_awt.so +0 -0
- data/library/opengl/library/linux32/libjogl_cg.so +0 -0
- data/library/opengl/library/linux64/libgluegen-rt.so +0 -0
- data/library/opengl/library/linux64/libjogl.so +0 -0
- data/library/opengl/library/linux64/libjogl_awt.so +0 -0
- data/library/opengl/library/linux64/libjogl_cg.so +0 -0
- data/library/opengl/library/macosx/libgluegen-rt.jnilib +0 -0
- data/library/opengl/library/macosx/libjogl.jnilib +0 -0
- data/library/opengl/library/macosx/libjogl_awt.jnilib +0 -0
- data/library/opengl/library/macosx/libjogl_cg.jnilib +0 -0
- data/library/opengl/library/opengl.jar +0 -0
- data/library/opengl/library/windows32/gluegen-rt.dll +0 -0
- data/library/opengl/library/windows32/jogl.dll +0 -0
- data/library/opengl/library/windows32/jogl_awt.dll +0 -0
- data/library/opengl/library/windows32/jogl_cg.dll +0 -0
- data/library/opengl/library/windows64/gluegen-rt.dll +0 -0
- data/library/opengl/library/windows64/jogl.dll +0 -0
- data/library/opengl/library/windows64/jogl_awt.dll +0 -0
- data/library/opengl/library/windows64/jogl_cg.dll +0 -0
- data/library/pdf/library/export.txt +0 -1
- data/library/pdf/library/itext.jar +0 -0
- data/library/pdf/library/pdf.jar +0 -0
- data/library/serial/library/RXTXcomm.jar +0 -0
- data/library/serial/library/export.txt +0 -1
- data/library/serial/library/linux32/librxtxSerial.so +0 -0
- data/library/serial/library/linux64/librxtxSerial.so +0 -0
- data/library/serial/library/macosx/librxtxSerial.jnilib +0 -0
- data/library/serial/library/serial.jar +0 -0
- data/library/serial/library/windows32/rxtxSerial.dll +0 -0
- data/library/serial/library/windows64/rxtxSerial.dll +0 -0
- data/library/video/library/export.txt +0 -1
- data/library/video/library/video.jar +0 -0
- data/samples/anar/data/java_args.txt +0 -1
- data/samples/anar/extrusion.rb +0 -49
- data/samples/anar/l_system.rb +0 -86
- data/samples/anar/library/anar/anar.jar +0 -0
- data/samples/anar/many_shapes.rb +0 -98
- data/samples/peasy_cam/data/java_args.txt +0 -1
- data/samples/peasy_cam/hilbert_fractal.rb +0 -40
- data/samples/peasy_cam/library/PeasyCam/PeasyCam.jar +0 -0
- data/samples/processing_app/3D/camera/move_eye.rb +0 -29
- data/samples/processing_app/3D/camera/ortho_vs_perspective.rb +0 -38
- data/samples/processing_app/3D/form/brick_tower.rb +0 -86
- data/samples/processing_app/3D/form/cubic_grid.rb +0 -51
- data/samples/processing_app/3D/form/rgb_cube.rb +0 -88
- data/samples/processing_app/3D/form/shape_transform.rb +0 -94
- data/samples/processing_app/3D/form/toroid.rb +0 -130
- data/samples/processing_app/3D/form/vertices.rb +0 -81
- data/samples/processing_app/3D/image/explode.rb +0 -56
- data/samples/processing_app/3D/image/extrusion.rb +0 -49
- data/samples/processing_app/3D/image/zoom.rb +0 -83
- data/samples/processing_app/3D/lights/directional.rb +0 -41
- data/samples/processing_app/3D/lights/lights1.rb +0 -39
- data/samples/processing_app/3D/lights/lights2.rb +0 -42
- data/samples/processing_app/3D/lights/reflection.rb +0 -38
- data/samples/processing_app/3D/lights/spot.rb +0 -39
- data/samples/processing_app/3D/textures/texture1.rb +0 -41
- data/samples/processing_app/3D/textures/texture2.rb +0 -38
- data/samples/processing_app/3D/textures/texture3.rb +0 -68
- data/samples/processing_app/3D/textures/texture_cube.rb +0 -106
- data/samples/processing_app/3D/transform/bird.rb +0 -61
- data/samples/processing_app/3D/transform/birds/birds.rb +0 -48
- data/samples/processing_app/3D/transform/cubes_in_cube/cubes_in_cube.rb +0 -102
- data/samples/processing_app/3D/transform/push_pop_cubes.rb +0 -152
- data/samples/processing_app/3D/transform/rotate1.rb +0 -43
- data/samples/processing_app/3D/transform/rotate2.rb +0 -45
- data/samples/processing_app/3D/typography/data/Univers66.vlw.gz +0 -0
- data/samples/processing_app/3D/typography/letter_k.rb +0 -136
- data/samples/processing_app/3D/typography/typing.rb +0 -77
- data/samples/processing_app/basics/data/characters_strings/characters_strings.rb +0 -85
- data/samples/processing_app/basics/data/characters_strings/data/Eureka-90.vlw +0 -0
- data/samples/processing_app/basics/data/characters_strings/data/rathausFrog.jpg +0 -0
- data/samples/processing_app/basics/input/keyboard_2.rb +0 -45
@@ -0,0 +1,79 @@
|
|
1
|
+
#
|
2
|
+
# Polygons
|
3
|
+
#
|
4
|
+
# by Ricard Marxer
|
5
|
+
#
|
6
|
+
# This example shows how to create polygon bodies.
|
7
|
+
#
|
8
|
+
|
9
|
+
load_library :fisica
|
10
|
+
include_package 'fisica'
|
11
|
+
|
12
|
+
attr_reader :world, :poly
|
13
|
+
|
14
|
+
def setup
|
15
|
+
size(400, 400)
|
16
|
+
smooth
|
17
|
+
Fisica.init(self)
|
18
|
+
@world = FWorld.new
|
19
|
+
world.set_gravity(0, 800)
|
20
|
+
world.set_edges
|
21
|
+
world.remove(world.left)
|
22
|
+
world.remove(world.right)
|
23
|
+
world.remove(world.top)
|
24
|
+
world.set_edges_restitution(0.5)
|
25
|
+
end
|
26
|
+
|
27
|
+
def draw
|
28
|
+
background(255)
|
29
|
+
world.step
|
30
|
+
world.draw(self)
|
31
|
+
# Draw the polygon while
|
32
|
+
# while it is being created
|
33
|
+
# and hasn't been added to the
|
34
|
+
# world yet
|
35
|
+
poly.draw(self) if (poly)
|
36
|
+
end
|
37
|
+
|
38
|
+
def mouse_pressed
|
39
|
+
unless (world.get_body(mouse_x, mouse_y))
|
40
|
+
@poly = FPoly.new
|
41
|
+
poly.set_stroke_weight(3)
|
42
|
+
poly.set_fill(120, 30, 90)
|
43
|
+
poly.set_density(10)
|
44
|
+
poly.set_restitution(0.5)
|
45
|
+
poly.vertex(mouse_x, mouse_y)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def mouse_dragged
|
50
|
+
poly.vertex(mouse_x, mouse_y) if (poly)
|
51
|
+
end
|
52
|
+
|
53
|
+
def mouse_released
|
54
|
+
if (poly)
|
55
|
+
world.add(poly)
|
56
|
+
@poly = nil
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Remove object under mouse using backspace 'key'
|
62
|
+
# any other key should save
|
63
|
+
#
|
64
|
+
|
65
|
+
def key_pressed
|
66
|
+
if key_code == BACKSPACE
|
67
|
+
hovered = world.get_body(mouse_x, mouse_y)
|
68
|
+
if (hovered && hovered.is_static == false)
|
69
|
+
world.remove(hovered)
|
70
|
+
end
|
71
|
+
else
|
72
|
+
save_frame("screenshot.png")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#
|
2
|
+
# Raycast
|
3
|
+
#
|
4
|
+
# by Ricard Marxer
|
5
|
+
#
|
6
|
+
# This example shows how to use the raycasts.
|
7
|
+
#
|
8
|
+
load_library :fisica
|
9
|
+
|
10
|
+
module Fisica
|
11
|
+
include_package 'fisica'
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
attr_reader :world, :obstacle
|
16
|
+
|
17
|
+
def setup
|
18
|
+
size(400, 400)
|
19
|
+
smooth
|
20
|
+
|
21
|
+
Fisica::Fisica.init(self)
|
22
|
+
|
23
|
+
@world = Fisica::FWorld.new
|
24
|
+
|
25
|
+
@obstacle = Fisica::FBox.new(150, 150)
|
26
|
+
obstacle.set_rotation(QUARTER_PI)
|
27
|
+
obstacle.set_position(width/2, height/2)
|
28
|
+
obstacle.set_static(true)
|
29
|
+
obstacle.set_fill(0)
|
30
|
+
obstacle.set_restitution(0)
|
31
|
+
world.add(obstacle)
|
32
|
+
end
|
33
|
+
|
34
|
+
def draw
|
35
|
+
background(255)
|
36
|
+
world.draw
|
37
|
+
world.step
|
38
|
+
cast_ray
|
39
|
+
end
|
40
|
+
|
41
|
+
def cast_ray
|
42
|
+
result = Fisica::FRaycastResult.new
|
43
|
+
b = world.raycast_one(width/2, height, mouse_x, mouse_y, result, true)
|
44
|
+
stroke(0)
|
45
|
+
line(width/2, height, mouse_x, mouse_y)
|
46
|
+
if (b)
|
47
|
+
b.set_fill(120, 90, 120)
|
48
|
+
fill(180, 20, 60)
|
49
|
+
no_stroke
|
50
|
+
x = result.get_x
|
51
|
+
y = result.get_y
|
52
|
+
ellipse(x, y, 10, 10)
|
53
|
+
else
|
54
|
+
obstacle.set_fill(0)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def key_pressed
|
59
|
+
save_frame("screenshot.png")
|
60
|
+
end
|
61
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
load_libraries :GenerativeDesign
|
2
|
+
|
3
|
+
java_import "generativedesign.Mesh"
|
4
|
+
|
5
|
+
def setup
|
6
|
+
size(1000,1000,P3D)
|
7
|
+
# setup drawing style
|
8
|
+
background(255)
|
9
|
+
no_stroke
|
10
|
+
fill(0)
|
11
|
+
# setup lights
|
12
|
+
light_specular(230, 230, 230)
|
13
|
+
directional_light(200, 200, 200, 0.5, 0.5, -1)
|
14
|
+
specular(color(220))
|
15
|
+
shininess(5.0)
|
16
|
+
# setup view
|
17
|
+
translate(width * 0.5, height * 0.5)
|
18
|
+
rotate_x(-0.2)
|
19
|
+
rotate_y(-0.5)
|
20
|
+
scale(100)
|
21
|
+
# setup Mesh, set colors and draw
|
22
|
+
myMesh = Mesh.new(self, Mesh::STEINBACHSCREW, 200, 200, -3.0, 3.0, -PI, PI)
|
23
|
+
myMesh.setColorRange(200, 200, 50, 50, 40, 40, 100)
|
24
|
+
myMesh.draw
|
25
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
load_libraries :GenerativeDesign
|
2
|
+
|
3
|
+
######################################
|
4
|
+
# node_spring_attractor.rb
|
5
|
+
# demonstrates use of a module to create
|
6
|
+
# a ruby namespace for a java package
|
7
|
+
######################################
|
8
|
+
|
9
|
+
module GD
|
10
|
+
include_package "generativedesign"
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_reader :nodeA, :nodeB, :attractor, :spring
|
14
|
+
|
15
|
+
def setup
|
16
|
+
size(512, 512, P3D)
|
17
|
+
lights
|
18
|
+
smooth(8)
|
19
|
+
fill(0)
|
20
|
+
@nodeA = GD::Node.new(rand * width, rand * height, rand(-200 .. 200))
|
21
|
+
@nodeB = GD::Node.new(rand * width, rand * height, rand(-200 .. 200))
|
22
|
+
nodeA.setStrength(-2)
|
23
|
+
nodeB.setStrength(-2)
|
24
|
+
nodeA.setDamping(0.1)
|
25
|
+
nodeB.setDamping(0.1)
|
26
|
+
nodeA.setBoundary(0, 0, -300, width, height, 300)
|
27
|
+
nodeB.setBoundary(0, 0, -300, width, height, 300)
|
28
|
+
@spring = GD::Spring.new(nodeA, nodeB)
|
29
|
+
spring.setStiffness(0.7)
|
30
|
+
spring.setDamping(0.9)
|
31
|
+
spring.set_length(100)
|
32
|
+
@attractor = GD::Attractor.new(width/2, height/2, 0)
|
33
|
+
attractor.setMode(GD::Attractor::SMOOTH)
|
34
|
+
attractor.setRadius(200)
|
35
|
+
attractor.setStrength(5)
|
36
|
+
end
|
37
|
+
|
38
|
+
def draw
|
39
|
+
background(50, 50, 200)
|
40
|
+
lights
|
41
|
+
ambient_light(100, 100, 100)
|
42
|
+
ambient(30)
|
43
|
+
specular(30)
|
44
|
+
# attraction between nodes
|
45
|
+
nodeA.attract(nodeB)
|
46
|
+
nodeB.attract(nodeA)
|
47
|
+
# update spring
|
48
|
+
spring.update
|
49
|
+
# attract
|
50
|
+
attractor.attract(nodeA)
|
51
|
+
attractor.attract(nodeB)
|
52
|
+
# update node positions
|
53
|
+
nodeA.update
|
54
|
+
nodeB.update
|
55
|
+
# draw attractor
|
56
|
+
stroke(0, 50)
|
57
|
+
stroke_weight(5)
|
58
|
+
no_fill
|
59
|
+
line(attractor.x - 10, attractor.y, attractor.x + 10, attractor.y)
|
60
|
+
line(attractor.x, attractor.y-10, attractor.x, attractor.y + 10)
|
61
|
+
ellipse(attractor.x, attractor.y, attractor.radius * 2, attractor.radius * 2)
|
62
|
+
# draw spring
|
63
|
+
stroke(255, 0, 0, 255)
|
64
|
+
stroke_weight(4)
|
65
|
+
line(nodeA.x, nodeA.y, nodeA.z, nodeB.x, nodeB.y, nodeB.z)
|
66
|
+
# draw nodes
|
67
|
+
no_stroke
|
68
|
+
fill(212)
|
69
|
+
push_matrix
|
70
|
+
translate(nodeA.x, nodeA.y, nodeA.z)
|
71
|
+
sphere(20)
|
72
|
+
pop_matrix
|
73
|
+
push_matrix
|
74
|
+
translate(nodeB.x, nodeB.y, nodeB.z)
|
75
|
+
sphere(20)
|
76
|
+
pop_matrix
|
77
|
+
end
|
78
|
+
|
79
|
+
def mouse_pressed
|
80
|
+
nodeA.x = mouse_x
|
81
|
+
nodeA.y = mouse_y
|
82
|
+
nodeA.z = mouse_y - 256
|
83
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
load_library :GenerativeDesign
|
2
|
+
|
3
|
+
java_import "generativedesign.Mesh"
|
4
|
+
|
5
|
+
attr_reader :my_mesh
|
6
|
+
|
7
|
+
def setup
|
8
|
+
size(1000, 1000, P3D)
|
9
|
+
color_mode(HSB, 360, 100, 100, 100)
|
10
|
+
noStroke
|
11
|
+
@my_mesh = MyOwnMesh.new(self)
|
12
|
+
my_mesh.setUCount(100) # don't try snake case here
|
13
|
+
my_mesh.setVCount(100) # don't try snake case here
|
14
|
+
my_mesh.setColorRange(193, 193, 30, 30, 85, 85, 100) # don't snake case here
|
15
|
+
my_mesh.update
|
16
|
+
end
|
17
|
+
|
18
|
+
def draw
|
19
|
+
background(255)
|
20
|
+
# setup lights
|
21
|
+
color_mode(RGB, 255, 255, 255, 100)
|
22
|
+
light_specular(255, 255, 255)
|
23
|
+
directional_light(255, 255, 255, 1, 1, -1)
|
24
|
+
shininess(5.0)
|
25
|
+
# setup view
|
26
|
+
translate(width/2, height/2)
|
27
|
+
scale(180)
|
28
|
+
my_mesh.draw
|
29
|
+
end
|
30
|
+
|
31
|
+
class MyOwnMesh < Mesh
|
32
|
+
A = 2/3.0
|
33
|
+
B = sqrt(2)
|
34
|
+
def initialize(the_parent)
|
35
|
+
super
|
36
|
+
end
|
37
|
+
# just override this function and put your own formulas inside
|
38
|
+
def calculatePoints(u, v) # NB: don't try snake case here
|
39
|
+
x = A * (cos(u) * cos(2 * v) + B * sin(u) * cos(v)) * cos(u) / (B - sin(2 * u) * sin(3 * v))
|
40
|
+
y = A * (cos(u) * sin(2 * v) - B * sin(u) * sin(v)) * cos(u) / (B - sin(2 * u) * sin(3 * v))
|
41
|
+
z = B * cos(u) * cos(u) / (B - sin(2 * u) * sin(3 * v))
|
42
|
+
return PVector.new(x, y, z)
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<svg>
|
2
|
+
<path fill="#005BAB" d="M205.2,17.1 C171.6,7.4,163.2,36.2,157,39.7 150.8,43.2,129.1,41.9,123.7,45.5 118.4,49,106.4,69,115.3,87.1 124.2,105.3,147.6,97.3,147.6,97.3 147.6,97.3,137,108.4,117.9,117.2 116.9,117.7,115.8,118.1,114.8,118.5 113.2,124.7,111.8,135.8,119.8,141.9 120.2,142.3,109,141,105.9,138.8 103.3,136.9,101,129,100.3,122.9 89.4,125,80.7,124,75.3,123.4 62,131.3,48.2,153.9,43.4,163.7 38.5,173.5,31.5,190.6,24.1,194.9 18.7,198,4.7,195.6,3.1,183.2 1.9,173.7,15.8,154,26.9,141.6 38,129.2,45.9,120.1,49,116.2 49.4,114.4,69.3,59.3,82.8,48.2 92.4,40.3,103.9,36,125.3,34.9 151.9,33.6,144.9,28.8,166.5,16.1 191.6,1.4,204.3,14.9,205.2,17.1z"/>
|
3
|
+
<path fill="#FFE600" d="M122.8,95 C114.4,86.1,111.5,63,120.1,53.4 134.7,37,149.6,45.8,157.8,40.5 169.7,33,178.8,16.2,184.8,15.2 195.5,13.5,202.8,14.9,204.7,18.3 208.2,24.5,199.1,35.9,196.8,38.2 193.2,41.8,196.4,52.4,196.4,52.4 192.8,57.7,175.6,58.6,171.6,63.9 167.6,69.2,160.7,94.6,145.5,98 137.4,99.9,130.3,103,122.8,95z"/>
|
4
|
+
<path fill="#ED1C24" d="M60,106.1 C45.4,119.8,43.1,147.2,43.1,147.2 68.8,140.2,78.5,123.8,78.5,123.8 65.3,124.2,60,106.1,60,106.1z"/>
|
5
|
+
<path fill="#ED1C24" d="M261.5,52.3 C273.4,55.5,256.3,73.3,294.4,83.9 288.5,35.5,261.5,52.3,261.5,52.3z"/>
|
6
|
+
<path fill="#6D67AF" d="M181.7,21.5 C177.6,27.9,180.9,34.8,186.2,36.1 193.8,37.9,203.5,30.9,201.7,22.8 199.9,14.9,185.1,16.2,181.7,21.5z"/>
|
7
|
+
<path fill="#72BF44" d="M203.8,40 C212.7,28.7,208.1,17.2,208.1,17.2 243,27.8,277.9,50.4,277.9,50.4 277.9,50.4,269.7,52.4,257.5,49.3 246.4,46.4,234.8,33.3,203.8,40z"/>
|
8
|
+
<path fill="#A96752" d="M62.7,90.5 C69.9,99.6,78.3,104.4,98.7,125 119.1,145.6,129.5,153,137.5,159.2 145.5,165.3,158.5,179.8,163.1,180.5 167.7,181.2,171.4,178.1,171.4,178.1 171.4,178.1,142,157.1,129.6,145.6 117.1,134.1,80.7,91.7,75.9,88.4 71.1,85.1,66.2,84.8,62.7,90.5z"/>
|
9
|
+
<path fill="#F58220" d="M211,44.5 C226.8,19.4,255.7,54,255.7,54 230.7,47.8,211,44.5,211,44.5z"/>
|
10
|
+
<path fill="#F58220" d="M129.4,140.4 C140.7,147.7,127.8,155,127.8,155 127.8,155,136.1,168.9,145.1,160 154,151.1,146.8,144.1,142.1,142 137.5,139.9,129.4,140.4,129.4,140.4z"/>
|
11
|
+
<path fill="#F58220" d="M77.5,87.4 C84.2,100.4,69.9,102.5,69.9,102.5 69.9,102.5,82.5,115.5,91.1,111.6 97,108.9,94.8,96.2,88.3,91.7 81.8,87.2,77.5,87.4,77.5,87.4z"/>
|
12
|
+
<path fill="#F58220" d="M114.4,85.9 C113.9,76,118.7,60.1,118.7,60.1 123.5,71.9,120.9,83.1,120.9,83.1 126.2,77.3,129.5,75.4,129.5,75.4 130.2,89.4,127.2,97,127.2,97 145.2,95.2,154.3,86.2,154.3,86.2 153.8,88.6,153.3,91,152.8,93.4 156.5,91.2,161.2,83.7,161.2,83.7 160.7,92.6,152.5,103.2,152.5,103.2 151.8,100.7,151.1,98.2,150.4,95.7 137.9,105.6,120.4,98.6,120.4,98.6 118,93.3,118.9,84.9,118.9,84.9 117.4,85.233,115.9,85.567,114.4,85.9z"/>
|
13
|
+
<path fill="#003465" d="M64.3,88.6 C64.3,88.6,65.2,83.3,69.8,83.1 71.9,83,73.5,84.9,75.8,88.4 77.7,91.5,80.3,94.5,80.3,94.5 76.5,92.2,74.1,88.8,71,87.6 68,86.5,64.3,88.6,64.3,88.6z"/>
|
14
|
+
<path fill="#003465" d="M93.3,108.4 C93.3,108.4,104.4,120,110.1,125 115.8,129.9,121,134,124.8,137.6 128.6,141.2,134.1,148.7,134.1,148.7 134.1,148.7,126.5,142.5,123.2,139.7 119.9,136.9,109.1,129.5,103.7,123.5 98.4,117.7,93.3,108.4,93.3,108.4z"/>
|
15
|
+
<path fill="#003465" d="M88.4,114.1 C88.4,114.1,95.2,120,100.3,124.9 105.4,129.8,117.1,140,117.1,140 117.1,140,106.2,135.3,98.8,127.1 91.4,118.9,88.4,114.1,88.4,114.1z"/>
|
16
|
+
<path fill="#003465" d="M119,142.2 C126.9,149.5,134.2,153.5,134.2,153.5 133.233,154.2,132.267,154.9,131.3,155.6 126.2,151.5,119,142.2,119,142.2z"/>
|
17
|
+
<path fill="#003465" d="M147.5,157.9 C162.3,171.7,171.4,178.2,171.4,178.2 158.2,171.9,145.9,161.2,145.9,161.2 146.433,160.1,146.967,159,147.5,157.9z"/>
|
18
|
+
<path fill="#003465" d="M135.8,31.8 C153.1,25.9,161.5,12.4,168.9,8.2 178.1,2.9,187.9,4.3,187.9,4.3 186.967,2.867,186.033,1.433,185.1,0 206.9,-0.6,207.4,18.3,207.4,18.3 203.4,7.9,192.3,5.5,192.3,5.5 194.7,8.1,196.8,12.2,196.8,12.2 196.8,12.2,188.2,7,177.9,9.6 161.4,13.9,158.3,30.2,135.8,31.8z"/>
|
19
|
+
<path fill="#003465" d="M113.3,57.4 C113.3,57.4,118.5,44.6,128,40.5 139.1,35.7,146.4,37.6,154.7,34.4 166.8,29.7,169.9,18.6,177.9,14.7 187.1,10.2,196.2,16.3,196.2,16.3 196.2,16.3,184,14.3,177.7,18.9 169.6,24.8,167.5,34.9,156.6,39.4 147.5,43.2,136,40.5,128.6,44.1 119.2,48.5,113.3,57.4,113.3,57.4z"/>
|
20
|
+
<path fill="#003465" d="M206.1,18.6 C206.2,24.7,203.5,33,195.5,37.1 186.8,41.6,183.9,34.7,182.5,27.2 180.1,46.1,191.7,45.1,193.1,43.8 190,53.8,198.3,54.4,198.3,54.4 193.4,48.2,199.4,41.1,203.6,34.4 207.5,28.1,207.5,21.9,206.1,18.6z"/>
|
21
|
+
<path fill="#003465" d="M208.1,19.2 C283,21.5,301.1,74.2,296.1,88 293.8,84,289.5,75.1,274.1,67 256.1,57.5,227.4,46,201.1,44.5 241.7,41,282,63.8,290.4,72.4 276.8,30.5,208.1,19.2,208.1,19.2z"/>
|
22
|
+
<path fill="#003465" d="M214.7,25.2 C214.7,25.2,213.4,26.9,214.2,28.4 215,29.9,217.5,29.6,220.9,30.1 227.5,31.2,230.1,34.5,230.1,34.5 226.4,33.1,225,32.8,220.9,32.8 216.7,32.8,212.1,32.9,211.5,30.1 210.8,26.5,213.5,25.2,214.7,25.2z"/>
|
23
|
+
<path fill="#003465" d="M200.6,56.3 C213.1,61.7,264,61.7,288.4,79.9 264,68.9,212.3,67.5,200.6,56.3z"/>
|
24
|
+
<path fill="#003465" d="M110.2,122.4 C137.9,112.9,154.2,87.3,154.2,87.3 154,94.2,153,99.1,153,99.1 164.6,86.6,162.3,80,170.5,69 165.9,81.2,168.3,83.8,162.2,94.2 158.2,101,152.1,105.6,149,116.1 147.8,110.6,148.3,102.7,148.3,102.7 128.4,123.8,110.2,122.4,110.2,122.4z"/>
|
25
|
+
<path fill="#003465" d="M168,85.8 C173.5,79.3,166.3,67.3,182.4,59.2 173.7,69,177.5,81.4,168,85.8z"/>
|
26
|
+
<path fill="#003465" d="M179.9,69.4 C186,60.7,193.1,65.1,198.1,55.4 190.3,60.8,185,52.5,179.9,69.4z"/>
|
27
|
+
<path fill="#003465" d="M118.1,58.8 C118.1,58.8,104.7,79.1,110,87.2 112.4,90.9,118.7,86.4,118.7,86.4 118.7,86.4,114.7,95.5,117.7,99.4 120.7,103.3,126,100,127.9,97.4 127.9,97.4,122.2,99.6,120.8,95.4 118.5,88.9,125.1,76.7,125.1,76.7 125.1,76.7,115.4,87.1,113.7,82.4 112,77.7,118.1,58.8,118.1,58.8z"/>
|
28
|
+
<path fill="#003465" d="M132.8,31.6 C82.5,25.3,64.5,52.9,64.5,52.9 68.2,51.3,73.7,50.5,73.7,50.5 48.6,81.8,49.7,110.7,49.7,110.7 53.1,109.9,58.2,107,58.2,107 58.2,107,40.2,129.3,32.6,138.3 25,147.3,-5.5,184,1.2,194.3 7.9,204.6,34,168.6,38.4,159.9 32.4,165.9,10.7,194.3,6.3,189.8 1.6,185,15.5,167.2,23.8,156.4 32.1,145.6,61.4,106.2,74.1,93.1 63.3,101.2,54.4,104.3,54.4,104.3 58.3,66.5,85.4,47.4,85.4,47.4 83.167,47.033,80.933,46.667,78.7,46.3 99.5,32.1,129.5,32.1,132.8,31.6z"/>
|
29
|
+
<path fill="#003465" d="M49.2,113.2 C39.3,128.8,8.9,152.4,0.4,179 -5.8,161.1,32,128.8,49.2,113.2z"/>
|
30
|
+
<path fill="#003465" d="M11.5,194.6 C13.6,200.7,17.1,200.9,25.7,192.8 37.1,182.2,50.8,155,57.4,147.3 49.6,153.6,44.1,153.2,44.1,153.2 45.8,138.2,61.1,121.9,61.1,121.9 52.4,135.9,49.7,147.3,49.7,147.3 49.7,147.3,57.6,144.2,61.6,140.4 66.4,135.9,69.7,131.3,77.2,127.8 73.9,131.2,67.2,136.7,58.7,150.5 50.2,164.3,43.1,181.3,32.1,194.6 27.8,199.8,22.6,204,18.5,204.7 13.7,205.5,10.4,202,11.5,194.6z"/>
|
31
|
+
<path fill="#003465" d="M63.8,78.8 C79.1,74,92.6,59.7,92.6,59.7 91.1,66.2,88,72.7,88,72.7 107.7,64.9,116.3,45.8,116.3,45.8 109.6,73.4,81.9,79.7,81.9,79.7 82.7,76.3,84.2,72.3,84.2,72.3 73.7,80.8,63.8,78.8,63.8,78.8z"/>
|
32
|
+
<path fill="#003465" d="M78.7,87.6 C80,87.3,84.9,86.3,85.9,90.6 87,94.9,84.9,99.3,82.2,101.3 79.5,103.3,75.4,105.3,71.4,103.2 74.7,102.6,78.7,101.7,81,96.9 83.2,92.1,82,88.3,78.7,87.6z"/>
|
33
|
+
<path fill="#003465" d="M76.5,106.4 C89,103.6,87.2,93.6,87.2,93.6 95.4,97.8,85.8,110.6,76.5,106.4z"/>
|
34
|
+
<path fill="#003465" d="M80.7,111.2 C93.2,108.4,91.4,98.4,91.4,98.4 99.5,102.5,90,115.4,80.7,111.2z"/>
|
35
|
+
<path fill="#003465" d="M65.8,104.2 C65,127.3,96.5,126.1,96.5,126.1 63,132.5,63,110.1,65.8,104.2z"/>
|
36
|
+
<path fill="#003465" d="M98.3,127.9 C102.5,131.8,101.9,139.1,104.1,140.8 106.3,142.5,112.8,140.2,116.1,142.9 111.4,142.4,105,146.9,102.1,144.8 99.2,142.8,100.9,133.5,98.3,127.9z"/>
|
37
|
+
<path fill="#003465" d="M116.7,121.3 C115.3,125.2,117.2,129,117.2,129 117.2,129,117.9,122.7,121.6,120.3 119.5,120.4,116.7,121.3,116.7,121.3z"/>
|
38
|
+
<path fill="#003465" d="M129.4,140.4 C129.4,140.4,137.7,137.5,139.8,139.9 141.9,142.3,140.9,148.6,138.7,152.1 136.5,155.6,133.7,158.3,129.8,158.1 127.3,158,126,155.6,126,155.6 126,155.6,130.8,156.8,133.7,152.9 136.6,149,136.9,145.8,136.4,143.7 135.4,140.3,129.4,140.4,129.4,140.4z"/>
|
39
|
+
<path fill="#003465" d="M132.4,159.7 C142.4,159.1,141.9,146.6,141.9,146.6 148.5,152.4,139.7,165.5,132.4,159.7z"/>
|
40
|
+
<path fill="#003465" d="M137.5,162.6 C147,161.5,146.3,152.6,146.3,152.6 151.8,157.5,144.8,167.4,137.5,162.6z"/>
|
41
|
+
<path fill="#003465" d="M186.2,26 C186.2,22.7,188.5,20.1,191.4,20.1 194.3,20.1,196.6,22.7,196.6,26 196.6,29.3,194.3,31.9,191.4,31.9 188.5,31.9,186.2,29.2,186.2,26z"/>
|
42
|
+
<path fill="#FFFFFF" d="M189.1,26 C189.1,24.6,190.1,23.4,191.4,23.4 192.6,23.4,193.7,24.5,193.7,26 193.7,27.4,192.7,28.6,191.4,28.6 190.1,28.5,189.1,27.4,189.1,26z"/>
|
43
|
+
</svg>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# hello_bot_ignore_styles.rb
|
2
|
+
# original sketch and library by Ricard Marxer
|
3
|
+
# http://www.ricardmarxer.com/geomerative/
|
4
|
+
|
5
|
+
load_library :geomerative
|
6
|
+
java_import 'geomerative.RG'
|
7
|
+
|
8
|
+
# Create a reader for the object we are going to create in setup and use in draw
|
9
|
+
attr_reader :grp
|
10
|
+
|
11
|
+
def setup
|
12
|
+
size 800, 600
|
13
|
+
smooth 4
|
14
|
+
# VERY IMPORTANT: Always initialize the library before using it
|
15
|
+
RG::init self
|
16
|
+
@grp = RG::load_shape "Toucan.svg"
|
17
|
+
grp.center_in g
|
18
|
+
end
|
19
|
+
|
20
|
+
def draw
|
21
|
+
background 255
|
22
|
+
translate width / 2, height / 2
|
23
|
+
|
24
|
+
point_separation = map(constrain(mouse_x, 200, width - 200), 200, width - 200, 5, 300)
|
25
|
+
|
26
|
+
RG.set_polygonizer RG.UNIFORMLENGTH
|
27
|
+
RG.set_polygonizer_length point_separation
|
28
|
+
new_grp = RG.polygonize grp
|
29
|
+
|
30
|
+
|
31
|
+
RG.ignore_styles false
|
32
|
+
new_grp.draw
|
33
|
+
|
34
|
+
RG.ignore_styles
|
35
|
+
no_fill
|
36
|
+
stroke 0, 100
|
37
|
+
grp.draw
|
38
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# hello_world_rotate.rb
|
2
|
+
# original sketch and library by Ricard Marxer
|
3
|
+
# http://www.ricardmarxer.com/geomerative/
|
4
|
+
|
5
|
+
load_library :geomerative
|
6
|
+
java_import 'geomerative.RG'
|
7
|
+
|
8
|
+
# Create a reader for the object we are going to create in setup and use in draw
|
9
|
+
attr_reader :grp
|
10
|
+
|
11
|
+
def setup
|
12
|
+
# Initialize the sketch
|
13
|
+
size 600, 400
|
14
|
+
frame_rate 24
|
15
|
+
|
16
|
+
# VERY IMPORTANT: Always initialize the library in the setup
|
17
|
+
RG::init(self)
|
18
|
+
|
19
|
+
# Set colors
|
20
|
+
|
21
|
+
fill(255,102,0)
|
22
|
+
stroke(0)
|
23
|
+
|
24
|
+
# Load the font file we want to use (the file must be in the data folder in the sketch floder),
|
25
|
+
# with the size 72 and the alignment CENTER
|
26
|
+
@grp = RG::get_text("Hola Mundo!", "FreeSans.ttf", 72, CENTER)
|
27
|
+
smooth 4
|
28
|
+
end
|
29
|
+
|
30
|
+
def draw
|
31
|
+
# Clean frame
|
32
|
+
background(255)
|
33
|
+
|
34
|
+
# Set the origin to draw in the middle of the sketch
|
35
|
+
translate width / 2, height / 2
|
36
|
+
|
37
|
+
# Transform at each frame the first letter with a PI/20 radians
|
38
|
+
# rotation around the center of the first letter's center
|
39
|
+
grp.children[0].rotate(PI/20, grp.children[0].get_center)
|
40
|
+
|
41
|
+
# Draw the group of shapes representing "Hola Mundo!" on the PGraphics canvas g (which is the default canvas of the sketch)
|
42
|
+
grp.draw
|
43
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# hola_mundo.rb
|
2
|
+
# original sketch and library by Ricard Marxer
|
3
|
+
# http://www.ricardmarxer.com/geomerative/
|
4
|
+
|
5
|
+
load_library :geomerative
|
6
|
+
java_import 'geomerative.RG'
|
7
|
+
|
8
|
+
# Create a reader for the object we are going to create in setup and use in draw
|
9
|
+
attr_reader :grp
|
10
|
+
|
11
|
+
def setup
|
12
|
+
# Initialize the sketch
|
13
|
+
size 600, 400
|
14
|
+
|
15
|
+
# VERY IMPORTANT: Always initialize the library in the setup
|
16
|
+
RG::init(self)
|
17
|
+
|
18
|
+
# Set fill stroke colours
|
19
|
+
fill(255, 102, 0)
|
20
|
+
stroke(0)
|
21
|
+
|
22
|
+
# Load the font file we want to use (the file must be in the data folder in the sketch folder),
|
23
|
+
# with the size 72 and the alignment CENTER
|
24
|
+
@grp = RG::get_text("Hola Mundo!", "FreeSans.ttf", 72, CENTER)
|
25
|
+
end
|
26
|
+
|
27
|
+
def draw
|
28
|
+
# Clear frame
|
29
|
+
background(255)
|
30
|
+
|
31
|
+
# Set the origin to draw in the middle of the sketch
|
32
|
+
translate width / 2, height / 2
|
33
|
+
|
34
|
+
# Draw the string "Hola Mundo!" on the PGraphics canvas g
|
35
|
+
# (which is the default canvas of the sketch)
|
36
|
+
grp.draw
|
37
|
+
end
|