def setup size 400,400, P3D kamera(self, { x_eye: 200.0, y_eye: 200.0, z_eye: 800.0, } # kamera(self, # { # x_eye: 200.0, # y_eye: 200.0, # z_eye: 800.0, # x_up: 0, # y_up: 1, # z_up: 0, # x_look_at: 0, # y_look_at: 0, # z_look_at: 0 # } ) end def draw lights rotate_x PI / 4 rotate_z PI / 6 box(width / 2, height / 2, width) end def kamera(app, option = {}) x_eye = option[:x_eye] y_eye = option[:y_eye] z_eye = option[:z_eye] x_up = option[:x_up] || 0 y_up = option[:y_up] || 1 z_up = option[:z_up] || 0 x_at = option[:x_look_at] || 0 y_at = option[:y_look_at] || 0 z_at = option[:z_look_at] || 0 app.camera(x_eye, y_eye, z_eye, x_at, y_at, z_at, x_up, y_up, z_up) end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Wednesday, 6 August 2014
Experimenting with a more explicit camera in ruby-processing
Labels:
camera,
readable,
ruby-processing
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2014
(79)
-
▼
August
(7)
- Getting started with ruby-processing for wizards (...
- JRuby-9000 returns for testing
- Another example of a sketch using map1d in JRubyAr...
- A more ruby like constrain (for JRubyArt , ruby-pr...
- Experimental map1d method JRubyArt (ruby-processin...
- Experimenting with a more explicit camera in ruby-...
- Experimental post_initialization hook for ruby-pro...
-
▼
August
(7)
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