ComplexMapper

ComplexMapper preview image

1 collaborator

Default-person Joshua Abrams (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.1.0 • Viewed 294 times • Downloaded 23 times • Run 0 times
Download the 'ComplexMapper' modelDownload this modelEmbed this model

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


WHAT IS IT?

This section could give a general understanding of what the model is trying to show or explain.

HOW IT WORKS

This section could explain what rules the agents use to create the overall behavior of the model.

HOW TO USE IT

This section could explain how to use the model, including a description of each of the items in the interface tab.

THINGS TO NOTICE

This section could give some ideas of things for the user to notice while running the model.

THINGS TO TRY

This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.

EXTENDING THE MODEL

This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.

Comments and Questions

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

Click to Run Model

globals [selectedpt]

to startup
setup
end 

to setup
;; (for this model to work with NetLogo's new plotting features,
  ;; __clear-all-and-reset-ticks should be replaced with clear-all at
  ;; the beginning of your setup procedure and reset-ticks at the end
  ;; of the procedure.)
  __clear-all-and-reset-ticks
ask patches [set pcolor white]
crt 2 [set color black set heading who * 90 pd repeat 16 [fd 1 rt 90 fd .1 fd -.2 fd .1 lt 90] rt 180 fd 16 repeat 17 [rt 90 fd .1 fd -.2 fd .1 lt 90 fd 1]]
clear-turtles
crt 1 [set size 0]
end 

to add
ask turtles with [who != 0] [if KeepPre-image? [stamp] setxy xcor + real ycor + imaginary]
if ConnectPoints? [ask turtle 0 [pu move-to turtle 1 pd let index 1 repeat selectedpt - 1 [set index index + 1 move-to turtle (index)]]]
end 

to sub
ask turtles with [who != 0] [if KeepPre-image? [stamp] setxy xcor - real ycor - imaginary]
if ConnectPoints? [ask turtle 0 [pu move-to turtle 1 pd let index 1 repeat selectedpt - 1 [set index index + 1 move-to turtle (index)]]]
end 

to mult
ask turtles with [who != 0] [if KeepPre-image? [stamp] setxy xcor * real - ycor * imaginary xcor * imaginary + real * ycor]
if ConnectPoints? [ask turtle 0 [pu move-to turtle 1 pd let index 1 repeat selectedpt - 1 [set index index + 1 move-to turtle (index)]]]
end 

to div
ask turtles with [who != 0] [if KeepPre-image? [stamp] setxy (xcor * real + ycor * imaginary)/(real ^ 2 + imaginary ^ 2) (- xcor * imaginary + real * ycor) / (real ^ 2 + imaginary ^ 2)]
if ConnectPoints? [ask turtle 0 [pu move-to turtle 1 pd let index 1 repeat selectedpt - 1 [set index index + 1 move-to turtle (index)]]]
end 

to square
end 

to addpt
ask turtles [set shape "circle"]
crt 1 [set shape "square" set size 0.4 setxy real imaginary set selectedpt who]
if ConnectPoints? and (selectedpt != 1) [ask turtle 0 [pu move-to turtle (selectedpt - 1) pd move-to turtle (selectedpt)]]
end 

; to checkselect
; ask turtles with [who != selectedpt] [set shape "circle"]
; ask turtles with [who = selectedpt] [set shape "square"]
; end

There is only one version of this model, created over 9 years ago by Joshua Abrams.

Attached files

File Type Description Last updated
ComplexMapper.png preview Preview for 'ComplexMapper' over 9 years ago, by Joshua Abrams Download

This model does not have any ancestors.

This model does not have any descendants.