Commit 4c0d16fd authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*aesthetic improvements to Jonathan's data structures demos

parent c4dce717
#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 138 Raphael Polar Clock;
#X text 524 138 ___________________;
#X text 524 310 If there's a lesson here \, it's this: if you make
#X text 524 125 Raphael Polar Clock;
#X text 524 125 ___________________;
#X text 524 300 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 160 It turns out trigonometry is difficult to grasp and
#X text 524 147 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 240 In addition \, drawing the arcs for this patch has
#X text 524 230 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment