using ratios to find coordinates