-2
$\begingroup$

First of all, if it's an existing problem just tell me the name, please. To solve the problem a formula/algorythm which receivs a center point of a snake (snake game type (points on a grid connected vertically or horizontally)), center point being average of all snake's body parts positions rounded, and second input being the length of the snake\amount of body parts, and outputs bounds in which all possible positions of snake's parts can be in. I've done something like this in desmos the online calculator, but snake's length is manually changed https://www.desmos.com/calculator/8ucpkofshc An example of a snake's position bounds

$\endgroup$

1 Answer 1

0
$\begingroup$

Your image, which I include below, answers your question: The region is a staircase diamond, which is the disk or ball of the $\ell^1$-norm. See "taxicab metric," a.k.a. the $L_1$-metric.


         


$\endgroup$
1
  • $\begingroup$ Thank you! I wouldn't notice the error I made when making the length 9 snake region otherwise, that error made me think these aren't just diamond shaped. $\endgroup$
    – Todam
    Oct 27, 2018 at 14:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.