Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
4c0d16fd
Commit
4c0d16fd
authored
Apr 02, 2014
by
Ivica Bukvic
Browse files
*aesthetic improvements to Jonathan's data structures demos
parent
c4dce717
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/doc/4.data.structures/pd-l2ork/ds-demos/polar-clock.pd
View file @
4c0d16fd
#N struct polar-clock float x float y float ax float ay float flag
float xloc float yloc float mx float my float r;
#N canvas 0 4 966 611 10;
#X scalar polar-clock 201 342 183.826 -98.6289 0 0 0 50 -150 200 \;
;
#N canvas 0 4 966 636 10;
#X scalar polar-clock 201 342 245.63 8.41769 0 0 0 50 -150 200 \;;
#X obj 57 29 struct polar-clock float x float y float ax float ay float
flag float xloc float yloc float mx float my float r;
#X obj 59 65 loadbang;
#X scalar polar-clock 201 342 168.903 157.061 0 0 0 50 -110 160 \;
#X scalar polar-clock 201 342 130 188.564 0 0 0 50 -110 160 \;;
#X scalar polar-clock 201 342 81.0584 -65.9111 0 0 0 50 -70 120 \;
;
#X scalar polar-clock 201 342 18.9419 165.911 1 0 0 50 -70 120 \;;
#X scalar polar-clock 201 342 33.3672 128.252 1 0 0 50 -30 80 \;;
#X scalar polar-clock 201 352 84.641 30 0 0 0 50 10 40 \;;
#N canvas 45 51 917 566 guts 0;
...
...
@@ -165,34 +164,34 @@ flag float xloc float yloc float mx float my float r;
\, stroke-linecap 1 \, stroke-opacity 0.4;
#X obj 59 110 draw path M mx my A r r 0 flag 1 ax ay;
#X obj 315 65 loadbang;
#X text 524 1
38
Raphael Polar Clock;
#X text 524 1
38
___________________;
#X text 524 3
1
0 If there's a lesson here \, it's this: if you make
#X text 524 1
25
Raphael Polar Clock;
#X text 524 1
25
___________________;
#X text 524 3
0
0 If there's a lesson here \, it's this: if you make
a spec like svg and you want other human beings to use it correctly
\, make it clear and easy to use. Then go get a coffee and rewrite
your incomprehensible \, ill-considered draft to actually make the
documentation equally clear. Otherwise that part of the spec will be
prone to errors and confusion \, from the backend to the wrapper libraries.
;
#X text 524 1
60
It turns out trigonometry is difficult to grasp and
#X text 524 1
47
It turns out trigonometry is difficult to grasp and
just as hard to explain. This example is ported from Raphael's polar
clock \, which draws an arc that follows the circumference of a circle.
The original code is left uncommented \, causing more than one question
on the internet equivalent to \, "how the heck does this thing work?".
;
#X text 524 2
4
0 In addition \, drawing the arcs for this patch has
#X text 524 2
3
0 In addition \, drawing the arcs for this patch has
revealed both an error in tkpath's calculations for the arc's bounding
box \, and an error somewhere in the drawing routine that causes the
"jitter" from 3 to 6 o'clock in the animation.;
#X text 524
410
If you think that's the job of a textbook \, do realize
that the hypothetical textbook author is going to use your
crappy spec
as the main (and probably _only_) reference. So take a sip of
coffee
\, think how much easier it is to write code for a living than
loading
things into a truck \, and get to work.;
#X text 524
397
If you think that's the job of a textbook \, do realize
that the hypothetical textbook author is going to use your
incomplete
spec
as the main (and probably _only_) reference. So take a sip of
coffee
\, think how much easier it is to write code for a living than
loading
things into a truck \, and get to work.;
#X text 524 480 This is just a partial port from Raphael. For example
\, drawing commands don't support the easing style. I'm just using
[line] \, but it's not hard to build a wrapper. (See easing.pd for
an example
.
);
an example);
#X connect 2 0 8 0;
#X connect 7 0 13 0;
#X connect 7 1 12 0;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment