绣球花

绣球花 preview image

1 collaborator

Default-person Qi Chen (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.2.2 • Viewed 45 times • Downloaded 4 times • Run 0 times
Download the '绣球花' 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

; 画一朵绣球花: 用多边形旋转角度后进行叠加,形成一朵绣球花
; 一些可调整的参数
; num: 花瓣的数量,即重复画多少个多边形
; slides: 每一片花瓣有几条边
; len: 花瓣的边长

; 降低ticks的速度,可以观察海龟画图的过程。

; netlogo 软件让我想起了小时候学的“海龟画图”,那时候好像还是在dos系统下进行操作的。
; 查阅资料后发现两个程序使用的是相同的语言, logo语言。
; 因此使用netlogo 写了这个小程序,纪念小学的电脑课。纪念早已被拆除的丁堰中心小学。
; By RaymondChen


turtles-own [p1]

to setup
  ca
  set-default-shape turtles "turtle"
  ask patches [set pcolor white]
  crt 1 [
    setxy 0 0
    set p1 (( random 14) * 10 ) ; 颜色的色相
  ]
  reset-ticks
end 

to go
  let i  0
  while [i < num] [
    ask turtles [
      draw0
      rt (360 / num)]
    set i i + 1
  ]
end 

to draw0
  pen-down
  repeat slides [
    fd len
    rt 360 / slides
  ]
end 

to go2
  let i  0
  while [i < num] [
    ask turtles [
      let  clr1 (p1 +  ((random 5) + 4) )
      set color clr1
      draw0
      rt (360 / num)
    ]
    set i i + 1
  ]
end 

There are 3 versions of this model.

Uploaded by When Description Download
Qi Chen almost 2 years ago Reverted to older version Download this version
Qi Chen almost 2 years ago version-2 Download this version
Qi Chen almost 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
绣球花.png preview Preview for '绣球花' almost 2 years ago, by Qi Chen Download

This model does not have any ancestors.

This model does not have any descendants.