Skip to content

Commit d9928e7

Browse files
committed
add documentation.yaml and update readme links to work in github/locally/docs
1 parent 7b2926e commit d9928e7

2 files changed

Lines changed: 510 additions & 91 deletions

File tree

README.md

Lines changed: 38 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# NetLogo View2.5D Extension
32

43
The `view2.5d` extension allows you to visualize 2d models on a 3d surface, using height to represent agent properties.
@@ -44,40 +43,38 @@ Send comments, bugs, or other feedback to [CCL Feedback](mailto:ccl-feedback@ccl
4443

4544
## Primitives
4645

47-
[`view2.5d:patch-view`](#view2.5dpatch-view)
48-
[`view2.5d:decorate-patch-view`](#view2.5ddecorate-patch-view)
49-
[`view2.5d:undecorate-patch-view`](#view2.5dundecorate-patch-view)
50-
[`view2.5d:turtle-view`](#view2.5dturtle-view)
51-
[`view2.5d:update-all-patch-views`](#view2.5dupdate-all-patch-views)
52-
[`view2.5d:update-patch-view`](#view2.5dupdate-patch-view)
53-
[`view2.5d:update-turtle-view`](#view2.5dupdate-turtle-view)
54-
[`view2.5d:get-z-scale`](#view2.5dget-z-scale)
55-
[`view2.5d:set-z-scale`](#view2.5dset-z-scale)
56-
[`view2.5d:set-turtle-stem-thickness`](#view2.5dset-turtle-stem-thickness)
57-
[`view2.5d:set-turtle-stem-color`](#view2.5dset-turtle-stem-color)
58-
[`view2.5d:show-links-xy-plane`](#view2.5dshow-links-xy-plane)
59-
[`view2.5d:show-links-xyz`](#view2.5dshow-links-xyz)
60-
[`view2.5d:get-observer-angles`](#view2.5dget-observer-angles)
61-
[`view2.5d:set-observer-angles`](#view2.5dset-observer-angles)
62-
[`view2.5d:get-observer-xy-focus`](#view2.5dget-observer-xy-focus)
63-
[`view2.5d:set-observer-xy-focus`](#view2.5dset-observer-xy-focus)
64-
[`view2.5d:get-observer-distance`](#view2.5dget-observer-distance)
65-
[`view2.5d:set-observer-distance`](#view2.5dset-observer-distance)
66-
[`view2.5d:remove-patch-view`](#view2.5dremove-patch-view)
67-
[`view2.5d:remove-turtle-view`](#view2.5dremove-turtle-view)
68-
[`view2.5d:remove-all-patch-views`](#view2.5dremove-all-patch-views)
69-
[`view2.5d:remove-all-turtle-views`](#view2.5dremove-all-turtle-views)
70-
[`view2.5d:count-windows`](#view2.5dcount-windows)
71-
46+
[`view2.5d:patch-view`](https://docs.netlogo.org/view2.5d#patch-view)
47+
[`view2.5d:decorate-patch-view`](https://docs.netlogo.org/view2.5d#decorate-patch-view)
48+
[`view2.5d:undecorate-patch-view`](https://docs.netlogo.org/view2.5d#undecorate-patch-view)
49+
[`view2.5d:turtle-view`](https://docs.netlogo.org/view2.5d#turtle-view)
50+
[`view2.5d:update-all-patch-views`](https://docs.netlogo.org/view2.5d#update-all-patch-views)
51+
[`view2.5d:update-patch-view`](https://docs.netlogo.org/view2.5d#update-patch-view)
52+
[`view2.5d:update-turtle-view`](https://docs.netlogo.org/view2.5d#update-turtle-view)
53+
[`view2.5d:get-z-scale`](https://docs.netlogo.org/view2.5d#get-z-scale)
54+
[`view2.5d:set-z-scale`](https://docs.netlogo.org/view2.5d#set-z-scale)
55+
[`view2.5d:set-turtle-stem-thickness`](https://docs.netlogo.org/view2.5d#set-turtle-stem-thickness)
56+
[`view2.5d:set-turtle-stem-color`](https://docs.netlogo.org/view2.5d#set-turtle-stem-color)
57+
[`view2.5d:show-links-xy-plane`](https://docs.netlogo.org/view2.5d#show-links-xy-plane)
58+
[`view2.5d:show-links-xyz`](https://docs.netlogo.org/view2.5d#show-links-xyz)
59+
[`view2.5d:get-observer-angles`](https://docs.netlogo.org/view2.5d#get-observer-angles)
60+
[`view2.5d:set-observer-angles`](https://docs.netlogo.org/view2.5d#set-observer-angles)
61+
[`view2.5d:get-observer-xy-focus`](https://docs.netlogo.org/view2.5d#get-observer-xy-focus)
62+
[`view2.5d:set-observer-xy-focus`](https://docs.netlogo.org/view2.5d#set-observer-xy-focus)
63+
[`view2.5d:get-observer-distance`](https://docs.netlogo.org/view2.5d#get-observer-distance)
64+
[`view2.5d:set-observer-distance`](https://docs.netlogo.org/view2.5d#set-observer-distance)
65+
[`view2.5d:remove-patch-view`](https://docs.netlogo.org/view2.5d#remove-patch-view)
66+
[`view2.5d:remove-turtle-view`](https://docs.netlogo.org/view2.5d#remove-turtle-view)
67+
[`view2.5d:remove-all-patch-views`](https://docs.netlogo.org/view2.5d#remove-all-patch-views)
68+
[`view2.5d:remove-all-turtle-views`](https://docs.netlogo.org/view2.5d#remove-all-turtle-views)
69+
[`view2.5d:count-windows`](https://docs.netlogo.org/view2.5d#count-windows)
7270

7371
### `view2.5d:patch-view`
7472

7573
```NetLogo
7674
view2.5d:patch-view Title Reporter
7775
```
7876

79-
80-
This command must be called from the Observer context. (Attempting to call from another context causes an error)
77+
This command must be called from the Observer context. (Attempting to call from another context causes an error)
8178
The Title is a string, which will be used to label the new Window and to call for subsequent updates and modifications.
8279
Specification of the Reporter uses the NetLogo anonymous procedure syntax, from the Observer perspective.
8380

@@ -87,17 +84,15 @@ Example:
8784
view2.5d:patch-view "Test" [ [the-patch] -> [pxcor] of the-patch ]
8885
```
8986

90-
9187
### `view2.5d:decorate-patch-view`
9288

9389
```NetLogo
9490
view2.5d:decorate-patch-view Title
9591
```
9692

97-
98-
This command must be called from the Observer context. (Attempting to call from another context causes an error)
93+
This command must be called from the Observer context. (Attempting to call from another context causes an error)
9994
The Title is a string, the label of an existing Patch View Window.
100-
Effect: draws the turtles of the model at their current location, on top of the Patch view display
95+
Effect: draws the turtles of the model at their current location, on top of the Patch view display
10196

10297
> NOTE: only has an effect in the "structures" patch view (in the others, the patch value is inclined based on neighbors & gradient)
10398
@@ -109,34 +104,30 @@ Example:
109104
view2.5d:decorate-patch-view "Test"
110105
```
111106

112-
113107
### `view2.5d:undecorate-patch-view`
114108

115109
```NetLogo
116110
view2.5d:undecorate-patch-view Title
117111
```
118112

119-
120-
This command must be called from the Observer context. (Attempting to call from another context causes an error)
113+
This command must be called from the Observer context. (Attempting to call from another context causes an error)
121114

122115
The Title is a string, the label of an existing Patch View Window.
123-
Effect: STOPS drawing the turtles of the model at their current location, on top of the Patch view display
116+
Effect: STOPS drawing the turtles of the model at their current location, on top of the Patch view display
124117

125118
Example:
126119

127120
```NetLogo
128121
view2.5d:undecorate-patch-view "Test"
129122
```
130123

131-
132124
### `view2.5d:turtle-view`
133125

134126
```NetLogo
135127
view2.5d:turtle-view Title Agents Reporter
136128
```
137129

138-
139-
This command must be called from the Observer context. (Attempting to call from another context causes an error)
130+
This command must be called from the Observer context. (Attempting to call from another context causes an error)
140131
The Title is a string, which will be used to label the new Window and to call for subsequent updates.
141132
The turtle-set is any selector for turtles.
142133
Reporter is an anonymous reporter that should take a turtle as input, and report some number from it.
@@ -148,83 +139,69 @@ view2.5d:turtle-view "Test" turtles with [color = red] [ the-turtle -> [energy]
148139
; This would create a new 2.5d window, plotting the ENERGY value of all turtles that are red.
149140
```
150141

151-
152142
### `view2.5d:update-all-patch-views`
153143

154144
```NetLogo
155145
view2.5d:update-all-patch-views
156146
```
157147

158-
159148
This command must be called from the Observer context.
160149
Updates all existing patch-view windows according to the latest values.
161150

162-
163151
### `view2.5d:update-patch-view`
164152

165153
```NetLogo
166154
view2.5d:update-patch-view Title
167155
```
168156

169-
170157
This command must be called from the Observer context.
171158
Updates only the patch-view window with the specified title (if any).
172159

173-
174160
### `view2.5d:update-turtle-view`
175161

176162
```NetLogo
177163
view2.5d:update-turtle-view Title Agents
178164
```
179165

180-
181166
This command must be called from the Observer context.
182167
Updates only the turtle-view window with the specified title (if any).
183168
The turtle-set selector must be supplied to refresh the set of turtles.
184169

185-
186170
### `view2.5d:get-z-scale`
187171

188172
```NetLogo
189173
view2.5d:get-z-scale title
190174
```
191175

192-
193176
This reporter must be called from the Observer context.
194177
Returns the current z-scale of the turtle-view or patch-view window with the specified title (if any).
195178

196-
197179
### `view2.5d:set-z-scale`
198180

199181
```NetLogo
200182
view2.5d:set-z-scale Title new-z-scale
201183
```
202184

203-
204185
This command must be called from the Observer context.
205186
Updates only the turtle-view or patch-view window with the specified title (if any).
206187
The view is now displayed with the new z-scale.
207188

208-
209189
### `view2.5d:set-turtle-stem-thickness`
210190

211191
```NetLogo
212192
view2.5d:set-turtle-stem-thickness Title thickness
213193
```
214194

215-
216195
This command must be called from the Observer context.
217196
Updates only the turtle-view window with the specified title (if any).
218197
Turtles are now drawn with "pins" or "stems" that have the specified thickness (instead of the hairline default).
219198

220-
221199
### `view2.5d:set-turtle-stem-color`
222200

223201
```NetLogo
224202
view2.5d:set-turtle-stem-color Title colorReporter
225203
```
226204

227-
228205
This command must be called from the Observer context.
229206
Updates only the turtle-view window with the specified title (if any).
230207
colorReporter is an anonymous reporter that should take a turtle as input, and report some number representing a color from it.
@@ -251,152 +228,125 @@ view2.5d:set-turtle-stem-color "Test" [ the-turtle -> [ color ] of the-turtle ]
251228
view2.5d:set-turtle-stem-color "Test" [ orange ]
252229
```
253230

254-
255231
### `view2.5d:show-links-xy-plane`
256232

257233
```NetLogo
258234
view2.5d:show-links-xy-plane Title
259235
```
260236

261-
262-
This command must be called from the Observer context.
263-
Updates only the turtle-view or patch-view window with the specified title (if any).
264-
Links are drawn in the xy-plane (instead of the turtle to turtle default).
265-
This option can be selected using the Link Options xy-plane radio Button in the 3D view.
266-
237+
This command must be called from the Observer context.
238+
Updates only the turtle-view or patch-view window with the specified title (if any).
239+
Links are drawn in the xy-plane (instead of the turtle to turtle default).
240+
This option can be selected using the Link Options xy-plane radio Button in the 3D view.
267241

268242
### `view2.5d:show-links-xyz`
269243

270244
```NetLogo
271245
view2.5d:show-links-xyz Title
272246
```
273247

274-
275-
This command must be called from the Observer context.
276-
Updates only the turtle-view or patch-view window with the specified title (if any).
277-
Links are drawn from turtle to turtle (this is the default way links are displayed).
278-
This option can be selected using the Link Options xyz radio Button in the 3D view.
279-
248+
This command must be called from the Observer context.
249+
Updates only the turtle-view or patch-view window with the specified title (if any).
250+
Links are drawn from turtle to turtle (this is the default way links are displayed).
251+
This option can be selected using the Link Options xyz radio Button in the 3D view.
280252

281253
### `view2.5d:get-observer-angles`
282254

283255
```NetLogo
284256
view2.5d:get-observer-angles Title
285257
```
286258

287-
288259
This reporter must be called from the Observer context.
289260
Returns a list reflecting the observer's angular perspective { heading pitch } (the place on an imaginary sphere at the zoom distance is updated to obey heading & pitch given)
290261

291-
292262
### `view2.5d:set-observer-angles`
293263

294264
```NetLogo
295265
view2.5d:set-observer-angles Title heading pitch
296266
```
297267

298-
299268
This command must be called from the Observer context.
300269
Updates only the turtle-view window with the specified title (if any).
301270
Sets the observer's angular perspective (the place on an imaginary sphere at the zoom distance is updated to obey heading & pitch given)
302271

303-
304272
### `view2.5d:get-observer-xy-focus`
305273

306274
```NetLogo
307275
view2.5d:get-observer-xy-focus Title
308276
```
309277

310-
311278
This reporter must be called from the Observer context.
312279
Returns a list reflecting the x and y coordinates the observer is "looking at" in the patch plane.
313280

314-
315281
### `view2.5d:set-observer-xy-focus`
316282

317283
```NetLogo
318284
view2.5d:set-observer-xy-focus Title number ycor
319285
```
320286

321-
322287
This command must be called from the Observer context.
323288
Updates only the turtle-view window with the specified title (if any).
324289
Sets the x and y coordinates the observer that is "looking at" in the patch plane.
325290

326-
327291
### `view2.5d:get-observer-distance`
328292

329293
```NetLogo
330294
view2.5d:get-observer-distance Title
331295
```
332296

333-
334297
This reporter must be called from the Observer context.
335298
Returns the observer's distance from its "focus point"
336299

337-
338300
### `view2.5d:set-observer-distance`
339301

340302
```NetLogo
341303
view2.5d:set-observer-distance Title new-distance
342304
```
343305

344-
345306
This command must be called from the Observer context.
346307
Updates only the turtle-view window with the specified title (if any).
347308
Sets the observer's distance from its "focus point"
348309

349-
350310
### `view2.5d:remove-patch-view`
351311

352312
```NetLogo
353313
view2.5d:remove-patch-view Title
354314
```
355315

356-
357316
This command closes and removes the specified patch view programmatically (equivalent to closing the window manually).
358317

359-
360318
### `view2.5d:remove-turtle-view`
361319

362320
```NetLogo
363321
view2.5d:remove-turtle-view Title
364322
```
365323

366-
367324
This command closes and removes the specified turtle view programmatically (equivalent to closing the window manually).
368325

369-
370326
### `view2.5d:remove-all-patch-views`
371327

372328
```NetLogo
373329
view2.5d:remove-all-patch-views
374330
```
375331

376-
377332
This command closes and removes all patch views programmatically (equivalent to closing the windows manually).
378333

379-
380334
### `view2.5d:remove-all-turtle-views`
381335

382336
```NetLogo
383337
view2.5d:remove-all-turtle-views
384338
```
385339

386-
387340
This command closes and removes all turtle views programmatically (equivalent to closing the windows manually).
388341

389-
390342
### `view2.5d:count-windows`
391343

392344
```NetLogo
393345
view2.5d:count-windows
394346
```
395347

396-
397348
This reporter returns the number of turtle and patch views that are currently active.
398349

399-
400350
## Acknowledgement
401351

402352
For development of the View 2.5D NetLogo Extension, we acknowledge financial support from Joshua M. Epstein's NIH Director's Pioneer Award (DP1).

0 commit comments

Comments
 (0)