Notes:Grid iteration
From Maths
Revision as of 17:44, 7 January 2018 by Alec (Talk | contribs) (Created page with "See Modulus operator for a definition of {{M|\text{Mod}(a,b)}} ==2D grid== * {{MM|\text{Mix}_x(k,m,n):\eq \text{Floor}\left(\text{Mod}\big(\text{Mod}(k,mn),m\big)\right)}}...")
See Modulus operator for a definition of [ilmath]\text{Mod}(a,b)[/ilmath]
2D grid
- [math]\text{Mix}_x(k,m,n):\eq \text{Floor}\left(\text{Mod}\big(\text{Mod}(k,mn),m\big)\right)[/math]
- [math]\text{Mix}_y(k,m,n):\eq \frac{\text{Mod}(k,mn)-\text{Mod}\big(\text{Mod}(k,mn),m\big)}{m} [/math]
Then
- Points of the form:
- [math]\big(\text{Mix}_x(k,m,n),\text{Mix}_y(k,m,n)\big)[/math] span an [ilmath]m\times n[/ilmath] grid, for [ilmath]k[/ilmath] from [ilmath]0[/ilmath] to [ilmath]mn-1[/ilmath]
3D grid
Suppose we have an [ilmath]\ell\times m\times n[/ilmath] grid,