Skip to content

Commit 4a2cf75

Browse files
committed
Refactor: Resave models with newlines around code and info section
1 parent 942e057 commit 4a2cf75

668 files changed

Lines changed: 5288 additions & 2616 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3D/Code Examples/Airplane Landing Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[globals [ speed ]
3+
<code><![CDATA[
4+
globals [ speed ]
45
56
to setup
67
clear-all
@@ -44,7 +45,8 @@ end
4445
4546
; Public Domain:
4647
; To the extent possible under law, Uri Wilensky has waived all
47-
; copyright and related or neighboring rights to this model.]]></code>
48+
; copyright and related or neighboring rights to this model.
49+
]]></code>
4850
<widgets>
4951
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-13" height="350" showTickCounter="true" patchSize="12.0" fontSize="10" wrappingAllowedY="true" width="330" tickCounterLabel="ticks" maxPycor="13" updateMode="1" frameRate="30.0" maxPzcor="13" maxPxcor="13" minPxcor="-13" minPzcor="-13"></view3d>
5052
<button x="58" y="52" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="70" sizeVersion="0">setup</button>
@@ -54,11 +56,13 @@ end
5456
<button x="58" y="204" height="33" disableUntilTicks="true" forever="false" kind="Observer" width="141" sizeVersion="0">ride turtle 0</button>
5557
<button x="58" y="134" height="33" disableUntilTicks="true" forever="false" kind="Observer" width="141" sizeVersion="0">watch turtle 0</button>
5658
</widgets>
57-
<info><![CDATA[## WHAT IS IT?
59+
<info><![CDATA[
60+
## WHAT IS IT?
5861
5962
This model is an animation of an airplane landing at an airport.
6063
61-
<!-- 2004 -->]]></info>
64+
<!-- 2004 -->
65+
]]></info>
6266
<turtleShapes>
6367
<shape name="default" rotatable="true" editableColorIndex="0">
6468
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Bouncing Balls Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[breed [ balls ball ]
3+
<code><![CDATA[
4+
breed [ balls ball ]
45
56
balls-own [ z-vel x-vel y-vel ]
67
turtles-own [ col ]
@@ -68,7 +69,8 @@ end
6869
6970
; Public Domain:
7071
; To the extent possible under law, Uri Wilensky has waived all
71-
; copyright and related or neighboring rights to this model.]]></code>
72+
; copyright and related or neighboring rights to this model.
73+
]]></code>
7274
<widgets>
7375
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-9" height="254" showTickCounter="true" patchSize="12.0" fontSize="10" wrappingAllowedY="true" width="241" tickCounterLabel="ticks" maxPycor="9" updateMode="1" frameRate="30.0" maxPzcor="9" maxPxcor="9" minPxcor="-9" minPzcor="-9"></view3d>
7476
<button x="63" y="53" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="85" sizeVersion="0">setup</button>
@@ -79,15 +81,17 @@ end
7981
<button x="70" y="188" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="145" sizeVersion="0">reset-perspective</button>
8082
<button x="69" y="153" height="33" disableUntilTicks="true" forever="false" kind="Observer" width="146" sizeVersion="0">watch one-of balls</button>
8183
</widgets>
82-
<info><![CDATA[## WHAT IS IT?
84+
<info><![CDATA[
85+
## WHAT IS IT?
8386
8487
This is an example that displays many of the capabilities of NetLogo 3D.
8588
8689
## HOW TO USE IT
8790
8891
The SETUP button creates BALL-COUNT balls poised above the "floor" of the world. GO releases the balls and "gravity" pulls them down. The balls will bounce until they lose momentum. If the COLOR-SPEED? switch is on the color of the ball will be scaled the speed it is moving. If the TAILS? switch is on the balls will leave a trace of the path they have taken.
8992
90-
<!-- 2005 -->]]></info>
93+
<!-- 2005 -->
94+
]]></info>
9195
<turtleShapes>
9296
<shape name="default" rotatable="true" editableColorIndex="0">
9397
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Hill Climbing Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[breed[ stayers stayer ] ;; the actual points of the landscape
3+
<code><![CDATA[
4+
breed[ stayers stayer ] ;; the actual points of the landscape
45
breed[ walkers walker ] ;; turtles that move around the landscape
56
67
walkers-own
@@ -85,13 +86,15 @@ end
8586
8687
; Public Domain:
8788
; To the extent possible under law, Uri Wilensky has waived all
88-
; copyright and related or neighboring rights to this model.]]></code>
89+
; copyright and related or neighboring rights to this model.
90+
]]></code>
8991
<widgets>
9092
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-10" height="152" showTickCounter="true" patchSize="6.0" fontSize="10" wrappingAllowedY="true" width="241" tickCounterLabel="ticks" maxPycor="10" updateMode="1" frameRate="30.0" maxPzcor="5" maxPxcor="10" minPxcor="-10" minPzcor="0"></view3d>
9193
<button x="24" y="51" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="91" sizeVersion="0">setup</button>
9294
<button x="24" y="90" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="91" sizeVersion="0">go</button>
9395
</widgets>
94-
<info><![CDATA[## WHAT IS IT?
96+
<info><![CDATA[
97+
## WHAT IS IT?
9598
9699
This example shows make a terrain in 3D and move turtles across the terrain. This is much like the Hill Climbing Example in 2D. However, the elevation variation in the terrain is visible in the 3D space.
97100
@@ -103,7 +106,8 @@ The hill climbing code is very similar to `uphill` in 2D. However, we want the t
103106
104107
Note that terrain models are not full 3D models. Each spot on the landscape only has eight neighbors; we use links to indicate the neighbors of each location since it cannot be determined spatially. We do, however, use the 3D space to display the height of each location.
105108
106-
<!-- 2007 -->]]></info>
109+
<!-- 2007 -->
110+
]]></info>
107111
<turtleShapes>
108112
<shape name="default" rotatable="true" editableColorIndex="0">
109113
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Neighborhoods Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[;; This procedure creates 8 turtles in puts them in a circle
3+
<code><![CDATA[
4+
;; This procedure creates 8 turtles in puts them in a circle
45
to setup
56
clear-all
67
setxyz 10 -20 6 ; set the observer position
@@ -63,7 +64,8 @@ end
6364
6465
; Public Domain:
6566
; To the extent possible under law, Uri Wilensky has waived all
66-
; copyright and related or neighboring rights to this model.]]></code>
67+
; copyright and related or neighboring rights to this model.
68+
]]></code>
6769
<widgets>
6870
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-17" height="341" showTickCounter="true" patchSize="9.0" fontSize="10" wrappingAllowedY="true" width="321" tickCounterLabel="ticks" maxPycor="17" updateMode="1" frameRate="30.0" maxPzcor="6" maxPxcor="17" minPxcor="-17" minPzcor="-6"></view3d>
6971
<button x="76" y="29" height="37" disableUntilTicks="false" forever="false" kind="Observer" width="127" sizeVersion="0">setup</button>
@@ -76,7 +78,8 @@ end
7678
</chooser>
7779
<button x="10" y="124" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="120" sizeVersion="0">paint-in-radius</button>
7880
</widgets>
79-
<info><![CDATA[## WHAT IS IT?
81+
<info><![CDATA[
82+
## WHAT IS IT?
8083
8184
This is a 3D version of the 2D model Neighborhoods Example This code example shows how to use the basic 2D and 3D neighborhood primitives in a 3D world. These include `neighbors`, `neighbors6`, `in-radius`, and `at-points`:
8285
@@ -90,7 +93,8 @@ This is a 3D version of the 2D model Neighborhoods Example This code example sho
9093
9194
Although in this example, we only change the color of the reported patches, you can of course do more complicated operations, including assigning that agentset to a variable. This is particularly useful for Cellular Automata models.
9295
93-
<!-- 2004 -->]]></info>
96+
<!-- 2004 -->
97+
]]></info>
9498
<turtleShapes>
9599
<shape name="default" rotatable="true" editableColorIndex="0">
96100
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Network Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[to setup
3+
<code><![CDATA[
4+
to setup
45
clear-all
56
;; These shapes were drawn using the Shapes Editor, on
67
;; the Tools menu.
@@ -47,7 +48,8 @@ end
4748
4849
; Public Domain:
4950
; To the extent possible under law, Uri Wilensky has waived all
50-
; copyright and related or neighboring rights to this model.]]></code>
51+
; copyright and related or neighboring rights to this model.
52+
]]></code>
5153
<widgets>
5254
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-20" height="436" showTickCounter="true" patchSize="10.0" fontSize="10" wrappingAllowedY="true" width="416" tickCounterLabel="ticks" maxPycor="20" updateMode="1" frameRate="30.0" maxPzcor="20" maxPxcor="20" minPxcor="-20" minPzcor="-20"></view3d>
5355
<button x="100" y="112" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="77" sizeVersion="0">go</button>
@@ -56,7 +58,8 @@ end
5658
<slider x="8" step="1" y="150" max="100" display="number-of-edges" height="33" min="0" direction="Horizontal" default="20.0" variable="number-of-edges" width="179" sizeVersion="0"></slider>
5759
<button x="27" y="187" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="141" sizeVersion="0">wiggle-nodes</button>
5860
</widgets>
59-
<info><![CDATA[## WHAT IS IT?
61+
<info><![CDATA[
62+
## WHAT IS IT?
6063
6164
This is a 3D version of the 2D model Network Example. The only significant difference from the 2D code is that we spread the nodes around the world in 3D space.
6265
@@ -88,7 +91,8 @@ Network Example
8891
8992
Owen Densmore's "Layout" model, available from the NetLogo User Community Models web page ([http://ccl.northwestern.edu/netlogo/models/community/](http://ccl.northwestern.edu/netlogo/models/community/)), shows how to make the nodes and edges automatically reposition themselves into a pleasing-looking layout. It also shows how to generate a network with "hubs", where the distribution of the number of edges the nodes have follows a power law.
9093
91-
<!-- 2004 -->]]></info>
94+
<!-- 2004 -->
95+
]]></info>
9296
<turtleShapes>
9397
<shape name="default" rotatable="true" editableColorIndex="0">
9498
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Shapes Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[to setup
3+
<code><![CDATA[
4+
to setup
45
clear-all
56
let threedshapes [ "default" "square" "circle" "triangle" "cylinder" "line" ]
67
let positions [ "rt 60" "rt 120" "tilt-up 60" "tilt-up 120" "tilt-up 180" ]
@@ -28,7 +29,8 @@ end
2829
2930
; Public Domain:
3031
; To the extent possible under law, Uri Wilensky has waived all
31-
; copyright and related or neighboring rights to this model.]]></code>
32+
; copyright and related or neighboring rights to this model.
33+
]]></code>
3234
<widgets>
3335
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-16" height="422" showTickCounter="false" patchSize="12.0" fontSize="10" wrappingAllowedY="true" width="498" tickCounterLabel="ticks" maxPycor="16" updateMode="0" frameRate="30.0" maxPzcor="2" maxPxcor="20" minPxcor="-20" minPzcor="-2"></view3d>
3436
<button x="105" y="45" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="82" sizeVersion="0">setup
@@ -42,11 +44,13 @@ end
4244
<button x="32" y="92" height="33" disableUntilTicks="false" forever="true" kind="Turtle" width="108" sizeVersion="0">right 0.1</button>
4345
<button x="32" y="126" height="33" disableUntilTicks="false" forever="true" kind="Turtle" width="108" sizeVersion="0">tilt-up 0.1</button>
4446
</widgets>
45-
<info><![CDATA[## WHAT IS IT?
47+
<info><![CDATA[
48+
## WHAT IS IT?
4649
4750
This code example shows all of the 3D shapes currently available in NetLogo 3D.
4851
49-
<!-- 2005 -->]]></info>
52+
<!-- 2005 -->
53+
]]></info>
5054
<turtleShapes>
5155
<shape name="default" rotatable="true" editableColorIndex="0">
5256
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Spherical Path Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[globals [ radius ]
3+
<code><![CDATA[
4+
globals [ radius ]
45
56
to setup
67
clear-all
@@ -67,7 +68,8 @@ end
6768
6869
; Public Domain:
6970
; To the extent possible under law, Uri Wilensky has waived all
70-
; copyright and related or neighboring rights to this model.]]></code>
71+
; copyright and related or neighboring rights to this model.
72+
]]></code>
7173
<widgets>
7274
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-16" height="455" showTickCounter="false" patchSize="13.0" fontSize="10" wrappingAllowedY="true" width="435" tickCounterLabel="ticks" maxPycor="16" updateMode="1" frameRate="30.0" maxPzcor="16" maxPxcor="16" minPxcor="-16" minPzcor="-16"></view3d>
7375
<chooser x="35" y="120" height="45" variable="step-size" current="1" display="step-size" width="175" sizeVersion="0">
@@ -89,7 +91,8 @@ end
8991
<button x="35" y="29" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="175" sizeVersion="0">setup</button>
9092
<slider x="35" step="1" y="65" max="360" display="wiggle-range" height="33" min="0" direction="Horizontal" default="0.0" variable="wiggle-range" units="degrees" width="175" sizeVersion="0"></slider>
9193
</widgets>
92-
<info><![CDATA[## WHAT IS IT?
94+
<info><![CDATA[
95+
## WHAT IS IT?
9396
9497
This shows how to make turtles move along a perfect sphere. The first procedure moves turtles based a user-defined distance to be travelled; the second moves then based on a user-defined degree measure.
9598
@@ -101,7 +104,8 @@ We use trigonometry to calculate the turtle's successive positions on the circle
101104
102105
Turtles Circling, Circular Path Example
103106
104-
<!-- 2007 -->]]></info>
107+
<!-- 2007 -->
108+
]]></info>
105109
<turtleShapes>
106110
<shape name="default" rotatable="true" editableColorIndex="0">
107111
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Three Loops Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[to setup
3+
<code><![CDATA[
4+
to setup
45
clear-all
56
create-turtles 3 [
67
set heading who * 90
@@ -21,17 +22,20 @@ end
2122
2223
; Public Domain:
2324
; To the extent possible under law, Uri Wilensky has waived all
24-
; copyright and related or neighboring rights to this model.]]></code>
25+
; copyright and related or neighboring rights to this model.
26+
]]></code>
2527
<widgets>
2628
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-9" height="254" showTickCounter="true" patchSize="12.0" fontSize="10" wrappingAllowedY="true" width="241" tickCounterLabel="ticks" maxPycor="9" updateMode="1" frameRate="30.0" maxPzcor="9" maxPxcor="9" minPxcor="-9" minPzcor="-9"></view3d>
2729
<button x="50" y="57" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="63" sizeVersion="0">setup</button>
2830
<button x="50" y="99" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="63" sizeVersion="0">go</button>
2931
</widgets>
30-
<info><![CDATA[## WHAT IS IT?
32+
<info><![CDATA[
33+
## WHAT IS IT?
3134
3235
This model shows three turtles moving around in NetLogo 3D. The gray turtle is changing only pitch and moving forward, the red turtle is changing only roll, and the orange turtle is changing pitch, roll, and heading as it is using right3d.
3336
34-
<!-- 2005 -->]]></info>
37+
<!-- 2005 -->
38+
]]></info>
3539
<turtleShapes>
3640
<shape name="default" rotatable="true" editableColorIndex="0">
3741
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Trails Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[to setup
3+
<code><![CDATA[
4+
to setup
45
clear-all
56
create-turtles number-of-drawers
67
[ set size 3
@@ -22,21 +23,24 @@ end
2223
2324
; Public Domain:
2425
; To the extent possible under law, Uri Wilensky has waived all
25-
; copyright and related or neighboring rights to this model.]]></code>
26+
; copyright and related or neighboring rights to this model.
27+
]]></code>
2628
<widgets>
2729
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-20" height="436" showTickCounter="true" patchSize="10.0" fontSize="10" wrappingAllowedY="true" width="416" tickCounterLabel="ticks" maxPycor="20" updateMode="1" frameRate="30.0" maxPzcor="20" maxPxcor="20" minPxcor="-20" minPzcor="-20"></view3d>
2830
<slider x="10" step="1" y="40" max="100" display="number-of-drawers" height="33" min="0" direction="Horizontal" default="10.0" variable="number-of-drawers" width="179" sizeVersion="0"></slider>
2931
<button x="38" y="82" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="118" sizeVersion="0">setup</button>
3032
<button x="38" y="117" height="33" disableUntilTicks="true" forever="true" kind="Observer" width="118" sizeVersion="0">go</button>
3133
<button x="38" y="152" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="118" sizeVersion="0">clear-drawing</button>
3234
</widgets>
33-
<info><![CDATA[## WHAT IS IT?
35+
<info><![CDATA[
36+
## WHAT IS IT?
3437
3538
This code example shows how to use turtles to draw lines that trace a turtle's trajectory.
3639
3740
Since each line segment in a turtle, the model will eventually slow down once there are too many lines on the screen. If your model is creating too many lines, decrease the resolution of each line by moving more than once between calls to draw-line-to.
3841
39-
<!-- 2006 -->]]></info>
42+
<!-- 2006 -->
43+
]]></info>
4044
<turtleShapes>
4145
<shape name="default" rotatable="true" editableColorIndex="0">
4246
<polygon color="-1920102913" filled="true" marked="true">

3D/Code Examples/Turtle Dance Example 3D.nlogox3d

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<model version="NetLogo 3D 7.0.4" snapToGrid="false">
3-
<code><![CDATA[to setup
3+
<code><![CDATA[
4+
to setup
45
clear-all
56
create-turtles number-of-turtles [
67
fd 9
@@ -22,7 +23,8 @@ end
2223
2324
; Public Domain:
2425
; To the extent possible under law, Uri Wilensky has waived all
25-
; copyright and related or neighboring rights to this model.]]></code>
26+
; copyright and related or neighboring rights to this model.
27+
]]></code>
2628
<widgets>
2729
<view3d wrappingAllowedZ="true" x="0" wrappingAllowedX="true" y="0" minPycor="-9" height="254" showTickCounter="true" patchSize="12.0" fontSize="10" wrappingAllowedY="true" width="241" tickCounterLabel="ticks" maxPycor="9" updateMode="1" frameRate="30.0" maxPzcor="9" maxPxcor="9" minPxcor="-9" minPzcor="-9"></view3d>
2830
<button x="20" y="68" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="90" sizeVersion="0">setup</button>
@@ -31,11 +33,13 @@ end
3133
<button x="7" y="103" height="33" disableUntilTicks="false" forever="false" kind="Turtle" width="103" sizeVersion="0">pen-down</button>
3234
<button x="113" y="103" height="33" disableUntilTicks="false" forever="false" kind="Observer" width="103" sizeVersion="0">clear-drawing</button>
3335
</widgets>
34-
<info><![CDATA[## WHAT IS IT?
36+
<info><![CDATA[
37+
## WHAT IS IT?
3538
3639
This is a simple Code Example to help new users understand how turtles move in 3D space. On each tick each turtle will move forward, turn left and pitch up.
3740
38-
<!-- 2005 -->]]></info>
41+
<!-- 2005 -->
42+
]]></info>
3943
<turtleShapes>
4044
<shape name="default" rotatable="true" editableColorIndex="0">
4145
<polygon color="-1920102913" filled="true" marked="true">

0 commit comments

Comments
 (0)