Hello there, I am reading Modeling Nature Cellular Automata by Richard J Gaylord book and I tried ‘flip-card’ animation codes (p.12 inserted below) on Wolfram Mathematica (bc I interest to see how it works) and seems to be not working. How can I fix it? Please help and thank you.
ShowCA[list_, opts__] :=
Map[show[
Graphics[
RasterArray[
list[[#]] {val1 -> RGBColor[x1, y1, z1],
val2 -> RGBColor[x2, y2, z2], ...}]], opts] &,
Range[Length[list]]]
Syntax::sntxf: "list[[#]]" cannot be followed by "{val1->RGBColor[x1,y1,z1],val2->RGBColor[x2,y2,z2],...}".
Thank you for taking your time responding to my message. I appreciate you. I took your advice, removed three dots and ran. It showed no error, but did not show the animation.
I am just wondering do I need to download a certain ‘add-on’ software in order to see the animation. Best.
Seems like you are new to the Wolfram Language / Mathematica. The code you shared just defines a function named ShowCA. You have to evaluate an expression involving the function and its arguments. Simple example
Define a function named myFunction that takes a single argument and evaluates to it’s square.
myFunction[arg_] := arg^2
Evaluate
myFunction[4]
(* 16 *)
I don’t have the book you are referring to but I am guessing it is trying to do something like this
Thank you for taking your time responding to my message. I appreciate you.
I ran your codes. Worked. It’s wonderful. I learned something new today.
Yes, You are right. I am new to both Mathematica software and Cellular Automata.
I came across Modeling Nature Cellular Automata with Mathematica by Richard J. Gaylord 1996ed. and thought give it a try and learned Mathematica at the same time. Thus, I registered with Wolfram Mathematica.
You have any books/sites suggestions for me about Cellular Automata with Mathematica. There is not much on Amazon.com
Again, thank you.