Pen: Difference between revisions

From StarLogo Nova Wiki
(Marked this version for translation)
(Marked this version for translation)
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
<section begin=image/>
<section begin=image/>
[[File:Pen .png|alt=pen|thumb]]
[[File:Pen .png|alt=pen|thumb]]
<section end=image/>
<section end=image/><p id="tooltip">Adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves along the terrain. If the pen is up, the agent does not stamp the terrain.</p>
 
<!--T:10-->
{{#vardefine:pen|<code>pen [▼]</code>}}
{{#vardefine:pen|<code>pen [▼]</code>}}
<section begin=name/>'''<code>pen [▼]</code>'''<section end=name/> is a [[code block]] part of the [[Environment]] drawer.
<section begin=name/>'''<code>pen [▼]</code>'''<section end=name/> is a [[code block]] part of the [[Environment]] drawer.
==Usage==
 
==Usage== <!--T:11-->


<!--T:2-->
<!--T:2-->
<p id="tooltip"><code>pen [▼](s)</code> adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves. If the pen is up, the agent does not stamp the terrain.</p>
<code>pen [▼](s)</code> adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves. If the pen is up, the agent does not stamp the terrain.


===Syntax=== <!--T:3-->
==Syntax== <!--T:3-->


<!--T:4-->
<!--T:4-->
<code> pen [Dropdown: Down/Up] </code>
<!-- <code> pen [Dropdown: Down/Up] </code> -->
[[File:Pen Nums.png|right|alt=The Pen Block|thumb]]
Inputs:
#either “up” or “down” from the dropdown menu
 
==Example== <!--T:12-->
 
<!--T:13-->
[[File:pen_example.gif|alt=Pen example gif|thumb]]
[[File:pen_example.png|alt=Pen example code|thumb]]
 
<!--T:14-->
This is an example of the flower turtles activity. Using the pen down block it is possible to track the movement of the turtles such that a flower appears on the terrain.  Note that the size of the trail a turtle leaves using pen down is proportional to the size of the turtle.


==Nuances== <!--T:5-->
==Nuances== <!--T:5-->

Latest revision as of 18:58, 11 August 2023

Other languages:
pen

Adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves along the terrain. If the pen is up, the agent does not stamp the terrain.


pen [▼] is a code block part of the Environment drawer.

Usage

pen [▼](s) adjusts the pen tool. If the pen is down, the agent stamps the terrain at each position as it moves. If the pen is up, the agent does not stamp the terrain.

Syntax

The Pen Block

Inputs:

  1. either “up” or “down” from the dropdown menu

Example

Pen example gif
Pen example code

This is an example of the flower turtles activity. Using the pen down block it is possible to track the movement of the turtles such that a flower appears on the terrain. Note that the size of the trail a turtle leaves using pen down is proportional to the size of the turtle.

Nuances

An important difference between pen [▼] and stamp [_] is that pen [▼] allows for continuous marking of the terrain that always follows the agent's movement.

Related Blocks

Relevant Video Resources

Relevant Activities