Difference between revisions of "Notes:Grid iteration"

From Maths
Jump to: navigation, search
m (typo)
m
Line 1: Line 1:
 
See [[Modulo operator]] for a definition of {{M|\text{Mod}(a,b)}}
 
See [[Modulo operator]] for a definition of {{M|\text{Mod}(a,b)}}
 
==2D grid==
 
==2D grid==
 +
[[File:2dGridReproduction small 4by5.gif|thumbnail|Notice the 21st point is back at the origin and the sequence repeats. [https://wiki.unifiedmathematics.com/index.php?title=File:2dGridReproduction_small_4by5.gif Direct link]]]
 
* {{MM|\text{Mix}_x(k,m,n):\eq \text{Floor}\left(\text{Mod}\big(\text{Mod}(k,mn),m\big)\right)}}
 
* {{MM|\text{Mix}_x(k,m,n):\eq \text{Floor}\left(\text{Mod}\big(\text{Mod}(k,mn),m\big)\right)}}
 
* {{MM|\text{Mix}_y(k,m,n):\eq \frac{\text{Mod}(k,mn)-\text{Mod}\big(\text{Mod}(k,mn),m\big)}{m} }}
 
* {{MM|\text{Mix}_y(k,m,n):\eq \frac{\text{Mod}(k,mn)-\text{Mod}\big(\text{Mod}(k,mn),m\big)}{m} }}

Revision as of 18:28, 7 January 2018

See Modulo operator for a definition of Mod(a,b)

2D grid

Notice the 21st point is back at the origin and the sequence repeats. Direct link
  • Mixx(k,m,n):=Floor(Mod(Mod(k,mn),m))
  • Mixy(k,m,n):=Mod(k,mn)Mod(Mod(k,mn),m)m

Then

  • Points of the form:
    • (Mixx(k,m,n),Mixy(k,m,n)) span an m×n grid, for k from 0 to mn1

3D grid

Suppose we have an ×m×n grid,