Rossler Attractor 2D_02

Rossler Attractor 2D_02 preview image

1 collaborator

Tags

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.1 • Viewed 395 times • Downloaded 26 times • Run 0 times
Download the 'Rossler Attractor 2D_02' 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

globals [
     mylist-x
     mylist-y
     mylist-z
     b
     X
     Y
     Z
     dt
    ]

to setup
  clear-all
  ask patches with [ pxcor = 0 ] [  set pcolor white ]
  ask patches with [ pycor = 0 ] [  set pcolor white ]

  set mylist-x list 0 (X)
  set mylist-y list 0 (Y)
  set mylist-z list 0 (Z)
  system-dynamics-setup
  system-dynamics-do-plot
end 

to system-dynamics-setup
  reset-ticks
  set dt 0.01
  set b 0.2
  set X 1
  set Y 0
  set Z 0
end 

to go
  system-dynamics-go
  system-dynamics-do-plot
  set mylist-x lput result-x mylist-x
  set mylist-y lput result-y mylist-y
  set mylist-z lput result-z mylist-z

  crt 1 [
  set color red
  set xcor (last mylist-x ) * 7
  set ycor (last mylist-y ) * 7
  set size 0.5
  set shape "circle"
  ]
end 

to-report result-x
  report X
end 

to-report result-y
    report Y
end 

to-report result-z
    report Z
end 

to system-dynamics-go

  let local-c c
  let local-inflow inflow
  let local-inflow1 inflow1
  let local-inflow2 inflow2

  let new-X ( X + local-inflow1 )
  let new-Y ( Y + local-inflow )
  let new-Z ( Z + local-inflow2 )
  set X new-X
  set Y new-Y
  set Z new-Z

  tick-advance dt
end 

to-report inflow
  report ( X + a * Y
  ) * dt
end 

to-report inflow1
  report ( - Y - Z
  ) * dt
end 

to-report inflow2
  report ( b + Z * ( X - c )
  ) * dt
end 

to-report c
  report c-slider
end 

to-report a
  report a-slider
end 

to system-dynamics-do-plot
  if plot-pen-exists? "X" [
    set-current-plot-pen "X"
    plotxy ticks X
  ]
  if plot-pen-exists? "Y" [
    set-current-plot-pen "Y"
    plotxy ticks Y
  ]
  if plot-pen-exists? "Z" [
    set-current-plot-pen "Z"
    plotxy ticks Z
  ]
end 

There is only one version of this model, created about 7 years ago by Victor Iapascurta.

Attached files

File Type Description Last updated
Rossler Attractor 2D_02.png preview Preview for 'Rossler Attractor 2D_02' about 7 years ago, by Victor Iapascurta Download

This model does not have any ancestors.

This model does not have any descendants.