¡@

Home 

python Programming Glossary: yc

python: Help to implement an algorithm to find the minimum-area-rectangle for given points in order to compute the major and minor axis length

http://stackoverflow.com/questions/13542855/python-help-to-implement-an-algorithm-to-find-the-minimum-area-rectangle-for-gi

pi math.atan2 dy dx s c math.sin theta math.cos theta yC hull i 0 s hull i 1 c xP yP iP mostfar iP n s c 0 1 if i 0 iR.. mostfar iR n s c 1 0 xL yL iL mostfar iL n s c 1 0 area yP yC xR xL print ' 2d 2d 2d 2d 9.3f '.format i iL iP iR area Note.. area ... line if area minRect 0 minRect area xR xL yP yC i iL iP iR # add after print ... line print 'Min rectangle '..

Python: implement a script in a function. Some suggestions

http://stackoverflow.com/questions/13553884/python-implement-a-script-in-a-function-some-suggestions

pi math.atan2 dy dx s c math.sin theta math.cos theta yC hull i 0 s hull i 1 c xP yP iP mostfar iP n s c 0 1 if i 0 iR.. mostfar iR n s c 1 0 xL yL iL mostfar iL n s c 1 0 area yP yC xR xL print ' 2d 2d 2d 2d 9.3f '.format i iL iP iR area the.. pi math.atan2 dy dx s c math.sin theta math.cos theta yC hull i 0 s hull i 1 c from here following the above example..