Thursday, April 26, 2012

Reaction Diffusion on a surface

Turing Reaction Diffusion mapped on a surface, rendered by maya (thank you Julia)

source code same as before, just mapped the Z values on a surface using normals....
also discovered an amazing way to store data in python on the way...its called pickle and it is used to write files representing complicated data structures (such as matrixes) and then read them into  diferent pieces of code. since the reaction diffusion code was very slow, now i dont have to run it every time, i just store the result and load it whenever i want

here is an example:

for storing the data: (A0 is the data matrix i wanted to store)

f = open('C:/AA-files/name-of-file', 'w')

for opening the data in a new file: (this code will load the matrix into RDval)

f = open('C:/AA-files/name-of-file', 'r')
RDval = pickle.load(f)

1 comment:

  1. hey, is it possible to post the script for this one.