TurSquiral

TurSquiral preview image

1 collaborator

Cosimo.leuci Cosimo Leuci (Author)

Tags

cellular automata 

Tagged by Cosimo Leuci almost 7 years ago

emergence 

Tagged by Cosimo Leuci almost 7 years ago

morphogenesis 

Tagged by Cosimo Leuci almost 7 years ago

turmite 

Tagged by Cosimo Leuci almost 7 years ago

turtle geometry 

Tagged by Cosimo Leuci almost 7 years ago

Part of project 'Starfish_Planet'
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.1 • Viewed 718 times • Downloaded 68 times • Run 0 times
Download the 'TurSquiral' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;  ---------------------   TurSquiral   ----------------------------------------------------------------
;;  -----------------------------------------------------------------------------------------------------


globals [ side step ]

turtles-own [state]

to setup
  clear-all
  ask patches [set pcolor white]
  crt 1[set heading -90]   ;; starting with different heading angle, you could get different outputs
  reset-ticks
end 

to patch-draw
  if mouse-down?     ;; reports true or false to indicate whether mouse button is down
    [
      ask patch mouse-xcor mouse-ycor
        [ set pcolor orange
          display ]
    ]
end 



;;  Squirals
;;  -----------------------------------------------------------------------------------------------------

to go_squiral
  set step 0
  ask turtles [ walk ]
  ask turtles [ rt angle ]
  set side side + increase
  tick-advance 1
end 

to walk
  set pcolor sky
  set step step + 1
  fd 1
  if step <= side [walk]
end 



;;  Turmites
;;  -----------------------------------------------------------------------------------------------------

to behaviour1    ;; the Langton's ant
  if pcolor != white [set pcolor white lt 90 fd 1]
  if pcolor = white  [set pcolor sky   rt 90 fd 1]
end 

to behaviour2
  if pcolor = white  and state = 0 [set pcolor sky   lt 90 set state 0 fd 1]
  if pcolor = white  and state = 1 [set pcolor white rt 90 set state 0 fd 1]
  if pcolor != white and state = 0 [set pcolor white lt 90 set state 1 fd 1]
  if pcolor != white and state = 1 [set pcolor sky   rt 90 set state 1 fd 1]
end 

to behaviour3
  if pcolor = white   [set pcolor magenta rt 90 fd 1]
  if pcolor = magenta [set pcolor sky     rt 90 fd 1]
  if pcolor = sky     [set pcolor orange  lt 90 fd 1]
  if pcolor = orange  [set pcolor white   lt 90 fd 1]
end 

to behaviour4
  if pcolor = white  and state = 0 [set pcolor sky   rt 90 set state 0 fd 1]
  if pcolor = white  and state = 1 [set pcolor white rt 0  set state 0 fd 1]
  if pcolor != white and state = 0 [set pcolor sky   rt 90 set state 1 fd 1]
  if pcolor != white and state = 1 [set pcolor white rt 0  set state 1 fd 1]
end 

There are 7 versions of this model.

Uploaded by When Description Download
Cosimo Leuci over 4 years ago 0.6.1 Download this version
Cosimo Leuci over 4 years ago Rev. 0.5.1 Download this version
Cosimo Leuci over 4 years ago Rev. 0.5 Download this version
Cosimo Leuci over 5 years ago references updates Download this version
Cosimo Leuci almost 7 years ago Info update: References Download this version
Cosimo Leuci almost 7 years ago Info update: what is it? Download this version
Cosimo Leuci almost 7 years ago Initial upload Download this version

Attached files

File Type Description Last updated
TurSquiral.png preview Preview for 'TurSquiral' about 6 years ago, by Cosimo Leuci Download

This model does not have any ancestors.

This model does not have any descendants.