Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brittney allen
purr-data
Commits
c1826e24
Commit
c1826e24
authored
11 years ago
by
Ivica Bukvic
Browse files
Options
Downloads
Patches
Plain Diff
added one more tutorial to new ds-tutorials
parent
c71ac41e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction
+270
-0
270 additions, 0 deletions
...ta.structures/pd-l2ork/ds-tutorials/00.under.construction
with
270 additions
and
0 deletions
pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction
0 → 100644
+
270
−
0
View file @
c1826e24
#N struct working-man-scalar float x float y;
#N canvas 0 19 895 618 10;
#N canvas 695 40 671 300 template 0;
#X obj 115 -2451 loadbang;
#X obj 115 -2409 draw path M 41.184 453.06 C 18.504 453.06 0 434.556
0 411.804 C 0 404.532 1.872 397.476 5.544 391.212 L 219.528 20.628
C 235.44 -6.876 274.968 -6.876 290.88 20.628 L 504.864 391.212 C 508.464
397.476 510.336 404.604 510.336 411.804 C 510.336 434.556 491.976 452.988
469.224 453.06 L 41.184 453.06 L 41.184 453.06 z;
#X obj 119 -2313 loadbang;
#X obj 119 -2271 draw polygon 52.2 405.468 458.136 405.468 255.168
53.892 52.2 405.468;
#X msg 119 -2292 fill #feb82f;
#X obj 123 -2174 draw path M 419.4 378.396 L 419.4 384.444 L 90.648
384.444 L 91.368 381.564 C 92.448 377.388 93.672 373.356 95.04 369.468
C 96.048 366.3 97.56 363.06 99.36 360.108 C 100.584 358.092 101.736
356.292 102.888 354.42 C 103.032 354.204 103.32 353.988 103.68 353.772
L 104.4 352.548 L 107.064 346.716 C 107.712 345.204 108.576 343.764
109.44 342.468 C 110.304 341.244 111.168 340.092 112.104 339.012 C
113.904 336.852 115.56 334.548 117 332.172 C 118.44 329.652 120.168
327.42 122.184 325.332 C 122.976 324.468 123.912 323.676 124.92 323.1
C 126.144 322.308 127.08 321.3 127.728 320.076 C 129.168 317.268 131.04
314.604 133.128 312.228 C 135.936 308.988 140.328 307.62 144.504 308.7
C 146.664 309.276 148.752 310.068 150.696 311.004 C 154.296 312.804
157.608 315.036 160.56 317.7 L 162.576 316.692 C 171.648 312.3 180.144
307.476 188.352 302.22 L 192.024 303.66 L 196.488 299.916 L 198.936
297.252 L 203.616 293.868 C 209.304 289.692 215.424 286.164 221.832
283.284 L 225.576 279.972 L 231.48 274.428 C 232.128 273.78 232.56
272.988 232.776 272.196 C 233.496 269.892 233.928 267.516 234.072 265.212
C 234.288 261.828 234.432 258.732 234.576 255.564 C 234.648 253.116
234.864 250.668 235.152 248.22 C 235.584 244.98 235.728 241.884 235.728
238.644 C 235.728 237.996 235.728 237.42 235.728 236.7 C 235.728 236.196
235.656 235.116 235.656 233.964 C 235.584 232.02 235.368 231.228 234.936
230.58 L 230.976 222.084 L 225.576 212.868 C 224.424 210.852 223.704
208.548 223.56 206.172 C 223.416 203.796 223.632 201.42 224.136 199.116
C 224.352 198.18 224.64 197.316 225 196.452 C 225.144 196.164 225.216
195.804 225.216 195.444 C 225.216 194.94 225 194.436 224.712 194.004
C 224.424 193.572 223.92 193.356 223.416 193.356 C 223.272 193.356
223.128 193.356 222.984 193.428 C 221.4 193.788 219.744 193.428 218.52
192.348 C 215.712 189.972 213.768 186.804 212.832 183.276 C 212.472
181.98 212.04 180.612 211.608 179.244 C 211.32 178.236 210.744 177.444
209.952 176.796 C 208.44 175.5 207.36 173.772 206.856 171.9 C 206.352
169.812 206.352 167.724 206.856 165.636 C 207.432 163.332 208.656 161.172
210.528 159.588 C 212.4 158.004 214.56 156.78 216.864 155.988 C 219.384
155.196 221.976 154.548 224.568 154.188 C 225.936 153.972 227.376 154.188
228.6 154.836 C 230.184 155.7 231.696 156.636 232.992 157.788 C 234.36
158.868 235.368 160.38 235.944 162.108 C 236.52 163.764 237.024 165.42
237.384 167.076 C 237.672 168.156 237.888 169.164 238.032 170.172 C
238.464 172.548 239.328 174.78 240.552 176.868 C 241.488 178.596 242.28
179.892 243.144 181.188 C 243 180.972 244.152 181.836 245.52 182.268
C 246.24 182.484 247.104 182.628 247.896 182.628 C 248.544 182.628
249.12 182.556 249.696 182.412 C 252.072 181.908 254.376 181.62 256.752
181.404 C 258.696 181.26 260.64 180.9 262.44 180.324 C 266.112 179.1
269.712 178.092 273.384 177.012 C 275.4 176.436 277.704 176.292 279.936
176.652 C 291.456 178.452 302.4 182.34 312.336 188.172 C 313.344 188.748
314.352 189.324 315.288 189.972 C 316.728 190.908 317.88 192.204 318.528
193.788 C 319.32 195.588 319.752 197.46 319.968 199.332 C 320.472 204.732
321.048 209.556 321.768 214.38 C 322.2 217.548 323.784 220.86 326.304
223.524 C 326.952 224.244 327.744 224.892 328.608 225.396 C 330.336
226.404 331.776 227.844 332.856 229.572 C 333.36 230.292 333.576 231.156
333.576 232.02 C 333.576 233.388 333 234.756 331.92 235.62 C 330.912
236.412 329.832 237.204 328.752 237.852 C 327.888 238.428 326.952 238.716
325.944 238.86 C 325.44 238.932 325.08 239.292 325.008 239.796 L 325.944
260.604 L 326.088 277.74 L 325.8 285.948 L 325.944 293.076 L 325.512
299.556 L 324.72 307.332 C 324.432 309.708 324.288 312.156 324.288
314.532 C 324.288 318.132 324.576 321.66 325.08 325.188 C 325.44 327.42
325.656 329.868 325.656 332.172 C 325.656 332.892 325.584 333.54 325.584
334.188 L 325.728 343.548 L 325.512 354.276 L 325.224 364.212 L 325.368
368.964 C 325.44 370.692 326.88 372.06 328.608 372.06 L 329.328 371.988
L 333.576 368.532 C 334.224 368.028 334.584 367.236 334.584 366.444
C 334.584 366.228 334.584 366.084 334.512 365.868 C 334.368 365.004
334.224 363.996 334.224 363.06 C 334.152 362.196 334.44 361.404 335.016
360.756 C 335.448 360.324 335.952 359.892 336.6 359.532 L 339.264 358.38
L 342.144 356.796 C 344.664 355.428 347.04 353.844 349.2 351.972 C
349.776 351.468 350.28 351.036 350.784 350.676 C 351.576 349.884 352.872
349.452 354.168 349.524 C 355.824 349.524 357.48 350.028 358.92 350.964
C 360.072 351.756 361.008 352.836 361.584 354.132 C 365.328 362.772
371.016 370.26 378.216 376.164 C 379.584 377.244 381.24 377.964 382.896
378.252 L 419.4 378.396 z;
#X obj 123 -2216 loadbang;
#X obj 123 -1115 loadbang;
#X msg 123 -1094 fill #feb82f;
#X obj 123 -1073 draw path M 247.248 264.636 C 247.32 264.708 247.392
264.708 247.536 264.708 C 247.824 264.708 248.112 264.636 248.328 264.348
C 249.768 262.692 251.064 261.108 252.288 259.452 C 253.224 258.3 254.016
257.076 254.88 255.852 C 255.528 254.844 256.176 253.764 256.896 252.756
C 257.616 251.748 258.264 250.668 258.84 249.588 C 259.776 247.86 260.64
246.276 261.504 244.62 C 262.08 243.468 262.584 242.028 262.8 240.516
C 263.016 239.724 263.16 238.86 263.376 237.996 C 263.52 237.636 263.592
237.132 263.592 236.628 L 263.592 236.628 C 263.592 235.908 263.304
235.188 262.8 234.612 L 261 232.596 L 258.84 230.94 C 258.408 230.508
257.904 230.292 257.328 230.292 C 256.608 230.292 255.888 230.724 255.528
231.372 L 254.088 233.748 C 253.8 234.468 253.584 235.188 253.512 235.98
C 253.512 237.348 253.368 238.716 253.08 240.084 C 252.936 240.732
252.504 242.604 252.144 244.476 C 251.136 249.3 250.056 253.044 248.904
256.572 L 248.04 259.02 L 247.032 261.972 C 246.816 262.476 246.672
263.052 246.672 263.628 C 246.672 263.772 246.672 263.916 246.744 264.06
C 246.744 264.348 246.96 264.636 247.248 264.636 z;
#X obj 148 -160;
#X obj 148 -139;
#X obj 125 -796 loadbang;
#X msg 125 -775 stroke black \, stroke-width 0.216;
#X obj 125 -754 draw line 246.744 263.988 247.176 264.636;
#X obj 126 -723 loadbang;
#X msg 126 -702 fill #feb82f;
#X obj 126 -681 draw path M 291.96 199.836 L 295.488 199.908 L 298.584
200.268 L 303.408 201.204 C 303.624 201.276 303.912 201.42 303.984
201.708 L 305.28 204.516 L 306.216 206.604 L 306.864 208.404 L 307.872
210.78 L 309.528 214.092 L 310.536 215.892 L 311.688 218.7 L 312.768
221.94 L 313.344 224.388 L 313.56 225.324 C 313.632 225.468 313.632
225.684 313.632 225.828 C 313.632 226.836 312.768 227.7 311.76 227.7
C 311.76 227.7 311.76 227.7 311.688 227.7 C 311.328 227.7 310.896 227.556
310.536 227.34 L 308.232 225.036 L 305.784 222.444 L 304.344 220.86
L 303.192 219.132 L 302.328 217.476 C 301.68 216.108 301.032 214.74
300.528 213.3 L 297.288 209.628 L 293.256 205.164 L 290.016 201.996
C 289.8 201.78 289.8 201.492 290.088 201.348 L 291.024 200.196 C 291.24
199.98 291.6 199.836 291.96 199.836 z;
#X obj 127 -476 loadbang;
#X msg 127 -455 fill #feb82f;
#X obj 127 -434 draw path M 254.304 371.484 L 263.16 365.436 L 263.592
365.148 L 265.248 364.644 L 268.56 363.852 L 274.968 360.036 L 274.608
358.74 C 274.104 356.508 273.024 354.348 271.656 352.476 C 270.504
350.82 269.424 349.092 268.56 347.22 C 267.84 345.78 267.48 344.34
267.408 342.756 C 267.12 337.788 266.256 332.82 264.96 327.924 C 263.448
322.596 261.648 317.124 259.704 311.652 C 258.696 308.988 258.192 306.468
257.976 304.02 C 257.904 303.444 257.832 302.868 257.904 302.292 C
257.904 301.932 258.048 301.572 258.264 301.284 L 260.208 299.484 L
262.512 297.684 L 264.672 295.74 L 267.336 293.364 L 268.992 291.636
L 276.264 283.716 L 277.2 282.492 L 277.632 281.844 C 278.064 281.196
278.568 280.548 279.072 279.9 C 279.36 279.54 279.648 279.324 280.008
279.108 L 282.96 277.308 L 285.12 276.516 C 285.84 276.228 286.704
276.3 287.28 276.804 C 288.216 277.524 288.864 278.676 289.152 279.828
L 289.512 283.716 L 289.944 287.532 L 291.024 295.164 C 291.24 297.036
291.384 298.836 291.384 300.636 C 291.384 302.364 291.24 304.02 291.024
305.676 C 290.952 306.324 290.952 306.972 290.952 307.62 C 290.952
309.492 291.24 311.364 291.888 313.092 C 292.392 314.388 292.968 315.612
293.616 316.764 C 295.272 319.86 296.496 323.1 297.36 326.484 C 297.936
328.86 298.296 331.236 298.368 333.684 C 298.512 337.644 299.016 341.604
299.88 345.492 C 300.384 347.796 300.744 349.668 301.176 351.684 C
301.248 352.188 301.896 352.692 302.616 352.692 C 302.76 352.692 302.904
352.692 303.048 352.62 L 304.776 352.692 C 305.136 352.692 305.496
352.98 305.568 353.34 C 306.072 355.068 306.288 356.796 306.288 358.524
C 306.288 360.18 306.072 361.836 305.64 363.42 C 305.28 365.004 304.128
366.228 302.616 366.732 C 301.32 367.164 299.952 367.524 298.584 367.668
C 297.288 367.884 296.208 368.82 295.992 370.044 C 295.848 370.62 295.776
371.124 295.776 371.628 L 295.776 371.7 L 295.776 371.7 C 295.776 372.924
294.984 373.86 293.904 374.148 C 292.824 374.508 291.672 374.724 290.592
374.796 C 288.936 374.94 287.28 375.156 285.552 375.444 L 280.296 375.588
L 274.176 375.3 L 269.28 374.508 L 266.184 373.788 L 261.432 372.852
L 258.192 372.204 L 254.304 371.484 z;
#X obj 131 88 loadbang;
#X msg 131 109 fill #feb82f;
#X obj 131 130 draw path M 163.224 321.372 L 165.096 321.012 L 170.064
319.932 C 173.448 319.212 176.688 318.204 179.856 316.836 C 182.592
315.684 184.68 314.82 186.768 313.956 C 189.288 312.948 191.808 311.292
194.04 309.204 L 197.568 306.252 L 200.592 303.228 L 202.536 301.572
L 204.768 299.916 L 206.856 298.404 L 209.448 296.82 L 211.32 295.812
L 213.336 294.804 L 215.424 293.796 L 217.656 292.644 L 219.312 291.78
L 220.824 290.844 L 222.264 290.052 L 225.36 288.756 L 231.48 305.46
L 231.624 306.108 L 231.768 306.756 L 234.144 314.676 L 236.16 322.812
L 237.672 327.996 L 238.68 331.884 L 240.84 341.676 L 241.416 344.772
C 241.776 346.356 242.496 347.796 243.648 349.02 C 244.08 349.452 244.584
349.812 245.088 350.028 C 246.312 350.676 247.608 350.964 248.976 350.964
C 249.192 350.964 249.48 350.964 249.696 350.892 C 250.632 350.82 251.568
351.18 252.144 351.9 C 253.44 353.412 254.232 355.212 254.52 357.156
C 254.52 357.228 254.52 357.372 254.52 357.444 C 254.52 357.804 254.448
358.164 254.304 358.452 L 251.64 362.7 L 251.136 363.492 L 245.16 366.876
C 244.728 367.092 244.44 367.596 244.44 368.1 C 244.44 368.172 244.44
368.244 244.44 368.316 L 244.944 370.26 L 242.928 369.828 C 240.336
369.18 237.672 368.892 234.864 368.892 C 233.28 368.892 231.624 368.964
230.04 369.18 C 226.944 369.612 223.776 370.188 220.536 370.98 C 217.224
371.772 213.84 372.204 210.312 372.276 C 207.936 372.348 205.56 372.06
203.328 371.412 C 202.392 371.196 201.312 370.908 200.304 370.692 C
198.216 370.332 196.344 369.324 194.976 367.812 C 193.968 366.804 192.744
365.436 191.448 364.212 L 188.208 359.604 L 186.408 356.724 L 184.464
353.916 L 182.736 351.396 L 180 347.22 L 178.704 345.132 L 176.832
341.316 L 175.464 338.292 L 174.528 336.42 L 173.736 334.908 C 171
329.94 167.544 325.332 163.296 321.372 L 163.224 321.372 z;
#X obj 121 -2492 struct working-man-scalar float x float y;
#X msg 123 -2195 fill black;
#X obj 246 -2434 draw group;
#X msg 115 -2430 fill #ed171f;
#N canvas 725 143 450 300 init 0;
#X obj 88 67 line;
#X obj 88 -19 loadbang;
#X msg 88 135 transform matrix -1 0 0 1 510.336 0 translate 200 200
scale \$1 translate -200 -200;
#X obj 88 112 pow 3;
#X msg 186 41 0.7 400;
#X obj 88 169 outlet;
#X obj 186 20 del 750;
#X msg 88 23 0.2 \, 0.9 750;
#X msg 41 68 0.5;
#X obj 88 2 del 750;
#X connect 0 0 3 0;
#X connect 1 0 8 0;
#X connect 1 0 9 0;
#X connect 2 0 5 0;
#X connect 3 0 2 0;
#X connect 4 0 0 0;
#X connect 6 0 4 0;
#X connect 7 0 0 0;
#X connect 8 0 3 0;
#X connect 9 0 7 0;
#X connect 9 0 6 0;
#X restore 246 -2464 pd init;
#X connect 0 0 27 0;
#X connect 2 0 4 0;
#X connect 4 0 3 0;
#X connect 6 0 25 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 10 0 11 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 19 0 20 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 25 0 5 0;
#X connect 27 0 1 0;
#X connect 28 0 26 0;
#X restore 443 6 pd template;
#X scalar working-man-scalar 218 -11 \;;
#X text 13 0 Still under heavy development!;
#X text 43 160 * stroke and fill methods;
#X text 43 40 Stable methods of the new [draw] object are:;
#X text 43 120 _Close_ to stable (won't change unless some big problem
is revealed):;
#X text 43 190 Wish I could figure out a better way to do them:;
#X text 43 80 * stroke-opacity \, fill-opacity \, transform \, stroke-width
\, stroke-miterlimit \, rx \, ry \, and stroke-dasharray methods.;
#X text 43 330 * [draw group]. This will probably change to [group]
and feature a subpatch so that you can do svg group nesting.;
#X text 43 300 Unstable (will probably change):;
#X text 43 470 Experimental:;
#X text 43 220 * fill-rule \, stroke-linejoin \, stroke-linecap. The
problem is that they take symbolic arguments in the svg standard \,
but with data structures a symbolic argument represents a variable
field. So I just use a float argument. I could use quotes around a
symbol to specify a constant string \, but that would be obscure and
at odds with the rest of Pd.;
#X text 43 370 * [draw shape] pattern \, [drawsprite] name \, [drawimage]
names. They are inconsistent. I don't particularly like the two word
naming scheme of [draw shape] \, but [drawpolygon] is already taken
and has a different interface. So I'll either change [draw shape] to
some one-word selector or change [drawsprite] to make it more consistent
with what I have so far.;
#X text 43 490 * mouse-dragging hotspots. This currently works like
old-school scalars \, and it even works with transforms. It's original
design is too limiting \, and with ds arrays the element hotspot may
even conflict with the coordinate hotspot. A more expressive way is
needed \, maybe something ported or inspired by Raphael.;
#X text 43 570 * scalar bbox caching. All that code is essentially
a duplication of tkpath and needs to happen in the GUI.;
#X text 480 333 Upcoming:;
#X text 480 353 * data method and x \, y \, etc. method for changing
shape coordinates on the fly;
#X text 480 393 * methods to better control mouse interaction. Something
like the old "-x" flag but allowing separate control of edit-mode displacement
and hotspot dragging. (Just because the drawing data contains a variable
doesn't mean it should be draggable.);
#X text 480 463 * [draw image] instead of [drawimage] \, so that it's
transformable. (Maybe the same with drawsprite \, not sure...);
#X text 480 513 * [draw text] for scalable svg text.;
#X text 480 543 * better [draw group] inheritance. Currently drawing
a shape gives it a bunch of default attributes which you have to manually
turn off to inherit attributes from a group.;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment