public void configure ( int width , int height , float vfov ) { declareVectors ( width , height ) ; float r = ( float ) Math . tan ( vfov / 2.0f ) ; for ( int pixelY = 0 ; pixelY < height ; pixelY ++ ) { float z = 2 * r * pixelY / ( height - 1 ) - r ; for ( int pixelX = 0 ; pixelX < width ; pixelX ++ ) { float theta = GrlConstants . F_PI2 * pixelX / width - GrlConstants . F_PI ; float x = ( float ) Math . cos ( theta ) ; float y = ( float ) Math . sin ( theta ) ; vectors [ pixelY * width + pixelX ] . set ( x , y , z ) ; } } }
Configures the rendered cylinder