Annotated SICP
- Structure and Interpretation of Computer Programs
- Front Matter
- 1 Building Abstractions with Procedures
- 2 Building Abstractions with Data
- 3 Modularity, Objects, and State
- 4 Metalinguistic Abstraction
- 5 Computing with Register Machines
- References
- List of Exercises

gQHFEmrpVNUkHm
The person above beat me to it, but I thguoht I’d add that you don’t need to move the origin, just the first tile you render from.To explain, the algorithm I thguoht of would:Locate highest’ square, this is your starting square.the line’ to render can be either direction, just pick one and stick to it, the other direction is the next line.This should be implementable in a quicker way than the way you have described, although the source code would probably be longer (big cases would probably be the most efficient way to program this, I think). It comes with two flaws I can see: objects existing in this grid should be restricted to the cube in which they reside; if they are bigger, overlaps may get ordered wrong. The other flaw is a very unlikely one, but if you want a non-rectangular game world, this won’t really work. Who’d use a non-rectangular world though, really?