NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

Try It in NetLogo Web

## WHAT IS IT?

The model is a space where one can create two points then link them together, as well as move these points from one location to another within the space, besides other things.

## HOW IT WORKS

The model behaves according to the desired user-action through the mouse control-buttons.
For instance, if you want to create a link between two points: click on "Create" then click inside the space to create the start point, then move to another location within the space and click once again to create the endpoint, as a result, the link will be drawn automatically.

## HOW TO USE IT

The model switching between four modes (Create, Delete, Move, and Draw). To start using the model, first, you need to click on the **"Setup"** button to prepare the workspace.

1. Click on **"Create"**, to switch to create mode, then click anywhere in the space to create the link start point, leave some space, then click once again to create the link endpoint; the model will automatically create a line between these two points.

2. Click on **"Delete"**, to switch to delete mode, then click over a point - either start point or endpoint, to automatically delete the link.

3. Click on **"Move"**, to switch to move mode, then click and hold the mouse button over a point - either start point or endpoint, move the point somewhere else, then release the mouse.

4. Click on **"Draw Angled Shape"**, to switch to Draw a free angled shape, choose an angle from the "Angle" slider and the steps from the "Steps" slider, then click the button to automatically draw the shape. _(**only the last link will be considered**)_

5. **"Lines Counter"** is for tracing how many lines exists in the world space.

6. **"Flag"** and **"Last Flag"**: to trace the switching between the 4 modes (Create, Delete, and Move).

## THINGS TO NOTICE

From the toolbar, set the ticks mode as "on-ticks" instead of "continuous".
Also, if you want to activate the action key, you have to click inside the interface, not the command centre.
In general, the model and the code are both direct and are easy to use.

## THINGS TO TRY

Use the sliders on the left side of the screen to change the appearance:

1. "Line-Color" slider: to change the color of the line.

2. "Line-Thickness" slider: to change the thickness of the line.

3. "Angle" slider: to change the angle the drawing - try it while the drawing is running!

4. "Steps" slider: to change the forward steps of the turtle - try it while the drawing is running!

5. "Startpoint-Shape" and "Endpoint-Shape" sliders: to change the shape of the start and end points.

6. "Point-Size" slider: to change the size of the start and end point.

## EXTENDING THE MODEL

The model could be extended to draw a shape - such as a square, a circle, etc., automatically by just specifying just one point.

## NETLOGO FEATURES

The "nearest-turtle" procedure - in the code, is created to decide if there is an existing turtle at the clicked spot or not.
## RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

## CREDITS AND REFERENCES

DSTI

Fawaz Qutami

(back to the NetLogo User Community Models)