ray coordinate grinding