Group Abstract Group Abstract

Message Boards Message Boards

11
|
32.2K Views
|
6 Replies
|
15 Total Likes
View groups...
Share
Share this post:

Computing Cellular Automatons with the Wolfram Cloud in an Android app

Posted 12 years ago
POSTED BY: Brett Haines
6 Replies
Posted 12 years ago

Hi Brett. Amazing examples! I'm tempted to build an MMA app but I'm intimidated by all the Java codes I've seen. How much proficiency in Java should I have to build apps like this? Lastly, what resource would you recommend a complete newbie to mobile app design to read?

POSTED BY: Kyle Nguyen
POSTED BY: Brett Haines

Very nice! One minor tweak might be to validate the user input to only accept integer-valued parameters:

https://www.wolframcloud.com/objects/user-4d6d3309-8894-48e9-b3bd-c49322e869c9/Samples/CellularAutomaton?rule=41.5&steps=30

Attachments:
POSTED BY: Andrew Walters

This would probably be easiest to fix by surrounding steps and rule with the Round function, or by checking the head of each in the If conditional to see if they are Integers. But either way, good catch!

POSTED BY: Brett Haines

Perfection!

This is already great. But it would be so cool to actually have a choice of random initial condition (a vector of 0 and 1 randomly populated) or single cell one that you already did. Would this be hard to implement? Should be control a radio-button or something else in the app?

POSTED BY: Sam Carrettie

App-side, a radio button group would probably be the easiest (and most user-friendly) way to do that. In the API function, this wouldn't be difficult to implement at all. We could add a third input to the input association list

"random"->"Boolean"

then use that in conjunction with another If command:

If[#random, 
    ArrayPlot[CellularAutomaton[#rule, RandomInteger[1, 100], #steps]],
    ArrayPlot[CellularAutomaton[#rule, {{1}, 0}, #steps]]
 ]

replacing the single ArrayPlot command that currently exists in the API.

Edit: If you use RandomInteger[1, #steps] instead, it will make the resulting evolution a square every time. This might save you some really poorly shaped images.

POSTED BY: Brett Haines
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard