Been looking at the code on p. 466 of the Processing Handbook for Conway's Game of Life. It
mostly makes sense.
What I can't figure is the bit about swapping the current and future grids @ line 36 - 40. Yes, the current grid should be replaced with the future grid but why the need for the "temp" array in line 37 and the switch in line 39? I've taken these lines of code out, leaving just line 38 (swapping current for future grid) and the Game acts funny...too many cells are born and survive, taking over the screen.
I'm trying to map data using Processing and then distort it so that appears correctly when wrapped to a 3D globe in Cinema4D. For example, here's some mapped data in 2D and 3D. Notice the distortion in the second image as it gets towards the poles, circles turn to ovals:
I have an equation that should correct for this distortion (more or less) that I have tried to use to distort the original 2D bitmap at top. My code takes each line of pixels, starting at the top and continuing line by line, and widens them accordingly. Here's the code followed by the outcome:
I think the problem here is that the forms as well as the spaces between them are being widened...creating the hourglass effect.
I think it would not be difficult to supplement the code that created the original 2D image with the code that distorts forms, solving the problem (although I'm not sure how to distort the text yet).
However, I have a collection of other bitmaps (not created in Processing) that map data that I would also like to distort and wrap to a 3D globe. So, does anyone have any other ideas for how I might distort this bitmap to wrap correctly?