calc extremePos