algorithmic modeling for Rhino
An adapted and optimized version of my Grey/Scott reaction difusion code, which runs based on the topology of the Mesh. The animation is realtime, the lag in the middle is because of the recalculation of the topology information.
It is run with the mesh wires previewed to show that it is a high density mesh.
Tags:
Comment
Amm, I had already applied the parallel.For... I guess it's slower than yours by the capacity of my computer (6 years, 2 cores, I insult and mistreatment him almost every day...). I had not noticed a significant performance improvement, so I thought it was something more complex, though I'm not sure at all if my code is threadable...
Okay, for comment, a good trick to manipulate patterns or play with, is to control the indexes of the neighbors to route patterns. For example, if you double/duplicate the closest neighbor index to a external point in each vertex, the diffusion will move faster towards that point.
I just use the .net implementable version of threading it is pretty easy, but you need to know whether or not your code is threadable... and be carefull, I have had a tone of problems with it...
I am essentially using the Parallel.For comand, which distributes the calculations to each thread, but this messes up your loop order, ie what I was talking about knowing whether or not your code is threadable...
Well done :)
In each iteration you send the U, V values of each vertex to the threads available, perform calculations and then you extract the new values for the next iteration? or perform the entire process always within the threads? I have not managed to optimize my code with this, but only use a few lines of code :]. Could you give us some clue about using threads in this case please?
There is some multithreading going on yes.. I actually havent tested it wihtout threading. But I assume it will be pretty fast though, since all the topology is build before hand, so all it does is loop through a single list.
I was really taked back by how heavy the Mesh.Vertices.GetConnectedVertices comand was, cutting that out cut the code down from 500 ms, to 20ms....
Anyway I can show you if you poped by Aarhus with Anders :)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!