Piet project

Piet project preview image

1 collaborator

Default-person BQ Zhang (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 5.2.1 • Viewed 222 times • Downloaded 34 times • Run 0 times
Download the 'Piet project' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

to setup
  ca
  ;ask patches [set pcolor background]
  ask patches [set pcolor white]
end 

to rectangle [ x y len width newColor ]
  ask patches with [pxcor >= x and pxcor <= (x + len) and
    pycor <= y and pycor >= (y - width)]
  [set pcolor newColor]
end 

to painting1
  ask patches with [pxcor = 9 ] [set pcolor black]
  ask patches with [pycor = 9] [set pcolor black]
  ask patches with [pxcor = 3 and pycor <= 8] [set pcolor black]
  ask patches with [pxcor = -5] [set pcolor black]
  ask patches with [pycor = 1 and pxcor <= -5] [set pcolor black]
  ask patches with [pycor = 1 and pxcor >= 9] [set pcolor black]
  ask patches with [pycor = -10] [set pcolor black]
  ask patches with [pycor = -2] [set pcolor black]
  rectangle 10 8 12 6 green
  rectangle -4 -11 6 7 yellow
  rectangle 4 -3 4 6 red
  rectangle -18 8 12 6 red
  rectangle -4 18 12 8 yellow
  rectangle -18 -3 12 6 green
  rectangle 10 0 8 1 yellow
end 

to painting2
  ask patches with [pycor = 16 and pxcor <= -3] [set pcolor black]
  ask patches with [pxcor = -3] [set pcolor black]
  ask patches with [pycor = 2] [set pcolor black]
  ask patches with [pxcor = 12 and pycor <= 2] [set pcolor black]
  ask patches with [pycor = 9 and pxcor >= -3] [set pcolor black]
  ask patches with [pycor = -14 and pxcor >= 12] [set pcolor black]
  ask patches with [pycor = -2 and pxcor <= -3] [set pcolor black]
  rectangle -2 1 13 19 orange
  rectangle -18 1 14 2 blue
  rectangle -18 -3 14 15 pink
  rectangle -18 18 14 1 orange
  rectangle 13 -15 5 3 blue
  rectangle -2 18 20 8 pink
end 

There is only one version of this model, created about 9 years ago by BQ Zhang.

Attached files

File Type Description Last updated
Piet project.png preview Preview for 'Piet project' about 9 years ago, by BQ Zhang Download

This model does not have any ancestors.

This model does not have any descendants.