##################### # # # 10 PRINT - Stacked 3D Version # # # ##################### # original by bit.craft W = 400 # canvas size N = 10 # number of grid cells D = W/N # diameter of a grid cell DPT = 0.5 # relative cell depth def setup size W, W, P3D rect_mode CENTER background 255 stroke_weight 3 end def draw # get coordinates xy = frame_count % (N*N) # shift image in z-direction if (xy == 0) img = get background 255 push_matrix translate 0, 0, -D * DPT fill 204 no_stroke image img, 0, 0 pop_matrix end # scale and rotate the square scale D translate (xy % N) + 0.5, (xy/N).to_i + 0.5, - DPT * 0.5 rotate_z QUARTER_PI - HALF_PI * rand(2) rotate_x HALF_PI # draw the square stroke 0 fill 255 rect 0, 0, sqrt(2), DPT end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Saturday, 13 July 2013
Another 10 PRINT sketch translated to ruby-processing
Catch the live version here.
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2013
(94)
-
▼
July
(8)
- Clobbering archived files in a github repository
- Fibonacci Sphere in Ruby Processing
- A simple ruby-processing paint application
- Using Threads in Ruby-Processing
- Yet Another 10 PRINT sketch in ruby-processing
- Another 10 PRINT sketch translated to ruby-processing
- Minimalist Perlin noise sketch in ruby-processing
- Setting texture sampling ruby-processing-2.0
-
▼
July
(8)
About Me
- monkstone
- I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2
No comments:
Post a Comment