Sha256: db3e08064397407aff6dd415de95a2421017a25a3b968b5195dcb5e9c30aa18e

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

# Primitives 3D. 
# 
# Placing mathematically 3D objects in synthetic space.
# The lights() method reveals their imagined dimension.
# The box() and sphere() functions each have one parameter
# which is used to specify their size. These shapes are
# positioned using the translate() function.


def setup    
    size 640, 360, P3D    
    background 0
    lights    
    no_stroke
    push_matrix    
    translate 130, height/2, 0
    rotate_y 1.25
    rotate_x -0.4    
    box 100    
    pop_matrix    
    no_fill
    stroke 255
    push_matrix    
    translate 500, height*0.35, -200
    sphere 280    
    pop_matrix    
end
  

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.6.2 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.6.1 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.6.0 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.5.1 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.5.0 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.4.4 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.4.3 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.4.2 samples/processing_app/basics/form/primitives.rb
ruby-processing-2.4.1 samples/processing_app/basics/form/primitives.rb