Research Article On Chamfer Distances on the Square and Body-Centered Cubic Grids: An Operational Research Approach Gergely Kov´ acs , 1 Benedek Nagy , 2 Gergely Stomfai, 3 Nes ¸et Deni ̇ z Turgay , 2 andB´ ela Vizv´ ari 4 1 Edutus University, Tatab´ anya, Hungary 2 Faculty of Arts and Sciences, Department of Mathematics, Eastern Mediterranean University, Famagusta, North Cyprus, via Mersin 10, Turkey 3 ELTE Ap´ aczai Csere J´ anos High School, Budapest, Hungary 4 Department of Industrial Engineering, Eastern Mediterranean University, Famagusta, North Cyprus, via Mersin 10, Turkey Correspondence should be addressed to Benedek Nagy; nbenedek.inf@gmail.com Received 19 February 2021; Revised 30 March 2021; Accepted 3 April 2021; Published 22 April 2021 Academic Editor: Mohammad Yazdi Copyright©2021GergelyKov´ acsetal.isisanopenaccessarticledistributedundertheCreativeCommonsAttributionLicense, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Linear programming is used to solve optimization problems. us, finding a shortest path in a grid is a good target to apply linear programming. In this paper, specific bipartite grids, the square and the body-centered cubic grids are studied. e former is represented as a “diagonal square grid” having points with pairs of either even or pairs of odd coordinates (highlighting the bipartite feature). erefore, a straightforward generalization of the representation describes the body-centered cubic grid in 3D. We use chamfer paths and chamfer distances in these grids; therefore, weights for the steps between the closest neighbors and steps between the closest same type points are fixed, and depending on the weights, various paths could be the shortest one. e vectors of the various neighbors form a basis if they are independent, and their number is the same as the dimension of the space studied. Depending on the relation of the weights, various bases could give the optimal solution and various steps are used in the shortest paths. is operational research approach determines the optimal paths as basic feasible solutions of a linear pro- gramming problem. A directed graph is given containing the feasible bases as nodes and arcs with conditions on the used weights suchthatthesimplexmethodmaystepfromonefeasiblebasistoanotherone.us,theoptimalbasescanbedetermined,andthey are summarized in two theorems. If the optimal solution is not integer, then the Gomory cut is applied and the integer optimal solution is reached after only one Gomory iteration. Chamfer distances are frequently used in image processing and analysis as well as graphics-related subjects. e body-centered cubic grid, which is well-known in solid state physics, material science, and crystallography, has various applications in imaging and graphics since less samples are needed to represent the signal in the same quality than on the cubic grid. Moreover, the body-centered cubic grid has also a topological advantage over the cubic grid, namely, the neighbor Voronoi cells always share a full face. 1. Introduction Grids have a significant role not only in crystallography, material science, and solid state physics but also in various engineering applications, e.g., in image processing and in digital geometry [1]. ere is a large variety of ways to tessellate the plane and the three dimensional space. Regular grids in 2D are the square, the hexagonal, and the triangular grids, and the only regular grid in 3D is the cubic grid [2, 3]. e square and the cubic grids are most popular grids since their coordinate systems are the Cartesian coordinate systems. ey are considered as the traditional grids. One of the earliest results on the square grid is the introduction of chessboard and cityblock motions which is given in [4]. e dual of the square grid is again a square grid, whereas the hexagonal and the triangular grids are duals of each other. e hexagonal grid has a useful symmetric coordinate frame, and every pixel, also called hexel [5], has six neighbors. e triangular grid is also described by the symmetric coordinate system. e useful Hindawi Mathematical Problems in Engineering Volume 2021, Article ID 5582034, 9 pages https://doi.org/10.1155/2021/5582034