public void parameterize ( int x , int y ) { // put the point in a new coordinate system centered at the image's origin x -= originX ; y -= originY ; int w2 = transform . width / 2 ; // The line's slope is encoded using the tangent angle. Those bins are along the image's y-axis for ( int i = 0 ; i < transform . height ; i ++ ) { // distance of closest point on line from a line defined by the point (x,y) and // the tangent theta=PI*i/height double p = x * tableTrig . c [ i ] + y * tableTrig . s [ i ] ; int col = ( int ) Math . floor ( p * w2 / r_max ) + w2 ; int index = transform . startIndex + i * transform . stride + col ; transform . data [ index ] ++ ; } }
Converts the pixel coordinate into a line in parameter space