trianguloCesiah

trianguloCesiah preview image

1 collaborator

Default-person Cesiah Lino (Author)

Tags

(This model has yet to be categorized with any tags)
Model group TallerMadero | Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.1.0 • Viewed 112 times • Downloaded 11 times • Run 0 times
Download the 'trianguloCesiah' 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

globals[n] ;; declaración de la variable global n (número de lados del polígono)

;: COMIENZA EL PROCEDIMIENTO

to comenzar
ca ;; borrar pantalla, variables, etc
crt 1 ;; creamos la tortuga que dibujará el polígono

;; asignamos un valor a n en función del número de lados del polígono elegido 

let figura

if figura = "triángulo"
[
set n 3
] 


if figura = "cuadrado"
[
set n 4
]


if figura = "pentágono"
[
set n 5
]


if figura = "hexágono"
[
set n 6
]


;; definimos el ángulo interior del polígono
let angulo 360 / n 


;; dibujamos el polígono

ask turtles [repeat n [pd fd lado rt angulo]]
end 

There is only one version of this model, created about 10 years ago by Cesiah Lino.

Attached files

File Type Description Last updated
trianguloCesiah.png preview Preview for 'trianguloCesiah' about 10 years ago, by Cesiah Lino Download

This model does not have any ancestors.

This model does not have any descendants.