HackerPoet / NonEuclidean

A Non-Euclidean Rendering Engine for 3D scenes.
MIT License
6.04k stars 579 forks source link

Cellular Automatons? #10

Open simsim314 opened 5 years ago

simsim314 commented 5 years ago

Hello folks. I'm an expert in cellular automatons i.e. conway game of life and the similar. http://www.conwaylife.com/wiki/Michael_Simkin - Some background about me.

Anyway I wonder how complex would it be to also fit inside your reality some cellular automaton? but where the longer part would actually have more squares. How would it influence the automaton? Is there even a point in doing that?

And another question how hard would it be to implement inside Roblox? https://www.roblox.com/home.

HackerPoet commented 5 years ago

For cellular automata (at least 2D automata), you don't really need an engine like this to simulate the effect. You can just place portals on the grid that connect to the same or different realities. Kind of like how the bottom row of the periodic table has a 'portal' to connect the lanthanides and actinides to the main table. The update rules are pretty simple to modify for the portal boundaries.

I also found this hyperbolic cellular automata: https://dmishin.github.io/hyperbolic-ca-simulator/help.html

simsim314 commented 5 years ago

Is it possible to visualize the hyperbolic space in more user friendly manner? Hyperbolic CA could be interesting - if we would have nicer visualization for it. I mean in the video you can look only at a glider in hyperbolic space - that's it.

I also thought of something like CA on Serpinski carpet. https://www.youtube.com/watch?v=nHe6vDpSlMs

HackerPoet commented 5 years ago

Unfortunately, there is so much more 'space' in hyperbolic space compared to euclidean space, that things must get exponentially compressed in order to project it into normal euclidean space. There are other projections though, but none are what I would call 'user friendly': https://youtu.be/xHvAqDuWG2M?t=6m27s

marcofs commented 5 years ago

@HackerPoet how did you generate the collisions on the .obj files? I'm trying to understand the code and I see a bunch of c * and c [some numbers] which I understand are collisions but can't understand how you made them (if it's hardcoded or not). I wanted to make some custom levels but it's hard without knowing how to manipulate those files.

simsim314 commented 5 years ago

Hmm how about for starters "size regularization" stretching the radius so that every new layer of N-gons will be optimized to be the size of the rest of the grid. The concern to me is the adjacency graph, I don't mind to have distortions of the N-gons. What stops me from stretching this circle into infinity artificially, trying to keep everything with regular size? Just some polar transformation.

HackerPoet commented 5 years ago

@marcofs They were all hard coded. I selected which triangles I wanted to use for collisions, copied the line, and then replaced the 'f' with 'c'. If you just want to get something working for visualization, you don't need to have any collisions other than the floor. Or you could just make every single triangle a collier, though this may have some unintended consequences.

@simsim314 So you mean an equal-area projection? That was in the video I linked at 11:23 and you can see how things get distorted as you move farther away, but the total area of each cell stays the same. If you don't mind the distortions, you could use that.

simsim314 commented 5 years ago

I'm not sure what projection it is. I want something more or less simple:

O(1) approachable adjacency graph. Preferably calculable by function and not stored in matrix of adjacencies - as I want to have millions of nodes at least. So matrices of the size million on million even sparse matrices like this are still very computationally intensive. Just like in the plane you get (x,y) -> (x+1,y-1) neighbors. You have a 2d array. I can spend more time on getting the neighbors but not space. Now when I have neighbors I want also to represent it all in a sparce tree. Just like on plane you can divide the square to four squares, and store only the 0.25% of the information and not the whole grid. This is called Hash life algorithm, and hash life tree. So not only visualization but adjacency graph and division of the indices into groups divided by some random line/plane/hyperplane don't know. I wonder if this is even possible in hyperbolic space - I don't know really.

simsim314 commented 5 years ago

I just need very effective visualization of the hyperbolic plane and very computationally cheap neighbor function all represented in 2d grid locally at least not so much stretched. So that I could see a glider moving not as a tiny dot but as equal grid. I mean at least not stretched in the sence of 1000x1000 at least. I know it's exponential but make the calculation, maybe it will more look like a hive and the adjacency graph will only be slightly correlated with the general direction. And this will be some sort of "grater than life" CA in 2D representing just regular CA on hyperbolic plane, with some sort of strange hyperbolic property of "general direction". Like say after 10 layers the size of the circle will grow so that the glider will still be in that direction. Anyway I want to see 1000x1000 dot's on my screen each of them representing something else inside this CA, and I can zoom in and out of it and look in many directions, and what I see will have some sort of meaning. I mean I can zoom in and see more details, like in fractals.

simsim314 commented 5 years ago

Here is my explanation using golly: https://www.twitch.tv/videos/392238658

ehx-v1 commented 5 years ago

How is any part of the discussion related to the issue's title?