You are on page 1of 1

4/21/2014

Primitives3D \ Examples \ Processing.org

Back To List This example is for Processing 2+. If you have a previous version, use the examples included with your software. If you see any errors or have suggestions, please let us know.

Cover Download Exhibition Reference Libraries Tools Environment Tutorials Examples Books Overview People Foundation Shop Forum GitHub Issues Wiki FAQ Twitter Facebook

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.
s i z e ( 6 4 0 ,3 6 0 ,P 3 D ) ; b a c k g r o u n d ( 0 ) ; l i g h t s ( ) ; n o S t r o k e ( ) ; p u s h M a t r i x ( ) ; t r a n s l a t e ( 1 3 0 ,h e i g h t / 2 ,0 ) ; r o t a t e Y ( 1 . 2 5 ) ; r o t a t e X ( 0 . 4 ) ; b o x ( 1 0 0 ) ; p o p M a t r i x ( ) ; n o F i l l ( ) ; s t r o k e ( 2 5 5 ) ; p u s h M a t r i x ( ) ; t r a n s l a t e ( 5 0 0 ,h e i g h t * 0 . 3 5 ,2 0 0 ) ; s p h e r e ( 2 8 0 ) ; p o p M a t r i x ( ) ;

Processing was initiated by Ben Fry and Casey Reas. It is developed by a small team of volunteers. Info \ Linux Web hosting by (mt) Media Temple.

http://processing.org/examples/primitives3d.html

1/11437

You might also like