1
$\begingroup$

This question already has an answer here:

So i'm trying to do this implementation of cellular automaton which replicates some random patterns generated by 3D printers like the ones below. strings generated by 3D printers

I'd basically like to create a model which looks something like this

Computational CA

Appreciate all inputs. I'm basically trying to implement a paper which has done this. But I don't see how the simulation happens.

The link for the paper is here. 3D printing simulation The algorithm mentioned by the author is this.

extrudedFilament = 0;
for layer in 1, 2, , layers loop // repeat for all layers
z = 0.4 * layer; // layer pitch is 0.4
for i in 0, 1, , 4 * 72 loop // repeat for all parts of a circle
cell[layer][i] = 0; // clear cells
if extrudedFilament >= 1 then
// Amount of extruded filament is sufficient.
if cell[layer–1][i] > 0 and random() <= pcurrent or
// The cell at the same location of previous layer
// is filled and the filament is successfully sticked.
cell[layer–1][i+1] > 0 and random() <= pnext then
// The cell at the next location of previous layer
// is filled and the filament is successfully sticked.
cell[layer][i] = 1; // fill cell
extrudedFilament = 0.0; // clear filament
end if
end if
drawNextArc(cell[layer][i], i, 2); // draw circle part
extrudedFilament = extrudedFilament + extrudedFilament1;
// newly extruded filament (0 < extrudedFilament1 < 1)
end loop
cell[layer][steps] = cell[layer][0];
end loop
$\endgroup$

marked as duplicate by Kuba, Bob Hanlon, m_goldberg, Yves Klett, bbgodfrey May 11 '15 at 14:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Have you tried to implement this yourself ? Share the code you have so far. $\endgroup$ – Sektor May 10 '15 at 22:09
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey May 10 '15 at 22:09
  • $\begingroup$ What is the purpose? Do you want to export this in some specific format, or just visualize it? Without seeing what you have tried, this question isn't very clear and will probably be closed due to lack of information. $\endgroup$ – Jens May 11 '15 at 3:45
  • $\begingroup$ Are answers here: 17084 helpful? $\endgroup$ – Kuba May 11 '15 at 6:47