Hello,
attached patch is inspired from code found in link you provide:
for (int i = 0; i< width; i++){
px2 = width/8 + cos(radians(angle2))*(radius);
py2 = 75 + sin(radians(angle2))*(radius);
point(width/8+radius+i, py2);
angle2 -= frequency2;
}
using Gem and recursion
Colet Patrice
> De: "Alexandros Drymonitis" <[email protected]>
> I want to build this visual http://processing.org/learning/trig/ in
> Pd, but I want the sine curve to be drawn dynamically with every
> circle spin. It seems quite hard though.
>
>
> I don't know which object would be best. I tried either [curve] but
> the parameters are way too many and I'm not sure if precision is
> really possible. Then I tried [square 0.008] in combination with
> [repeat] but also doesn't work.
> Anyone knows how to do this?
#N canvas 941 420 553 607 10;
#X obj 52 143 gemhead;
#X obj 48 98 gemwin;
#X obj 53 321 separator;
#X obj 53 302 repeat 100;
#X floatatom 561 137 5 0 0 0 - - -;
#X obj 560 158 / 100;
#X msg 78 70 destroy;
#X msg 48 47 create \, 1;
#X obj 53 340 t a b;
#X obj 80 359 f;
#X obj 107 440 sin;
#X obj 53 505 translateXYZ 0 0 0;
#X obj 104 359 - 1;
#X obj 107 420 * 6.28319;
#X obj 80 398 t a a;
#X obj 80 419 * 4;
#X obj 80 378 / 360;
#X obj 212 75 line;
#X obj 212 14 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 80 482 * 1;
#X obj 111 482 * 1;
#X obj 53 182 t a a;
#X obj 80 201 separator;
#X obj 80 256 curve 2;
#X msg 143 225 \$1 0 0;
#X obj 143 206 * 4;
#X obj 176 453 r radius;
#X obj 143 187 r radius;
#X obj 307 65 s radius;
#X floatatom 425 16 5 0 0 0 - - -;
#X obj 425 39 s lenght;
#X obj 110 281 r lenght;
#X obj 52 163 translateXYZ -4 0 0;
#X obj 212 97 s lenght;
#X text 234 10 <;
#X obj 307 26 nbx 4 14 0.1 200 0 1 empty empty empty 0 -8 0 10 -262144
-1 -1 198 256;
#X obj 129 359 mod 360;
#X obj 307 45 / 100;
#X msg 212 55 0 \, 360 10000;
#X obj 53 529 square 0.02;
#X connect 0 0 32 0;
#X connect 2 0 8 0;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X connect 8 0 11 0;
#X connect 8 1 9 0;
#X connect 9 0 12 0;
#X connect 9 0 16 0;
#X connect 10 0 20 0;
#X connect 11 0 39 0;
#X connect 12 0 36 0;
#X connect 13 0 10 0;
#X connect 14 0 15 0;
#X connect 14 1 13 0;
#X connect 15 0 19 0;
#X connect 16 0 14 0;
#X connect 17 0 33 0;
#X connect 18 0 38 0;
#X connect 18 0 7 0;
#X connect 19 0 11 1;
#X connect 20 0 11 2;
#X connect 21 0 3 0;
#X connect 21 1 22 0;
#X connect 22 0 23 0;
#X connect 24 0 23 2;
#X connect 25 0 24 0;
#X connect 26 0 20 1;
#X connect 26 0 19 1;
#X connect 27 0 25 0;
#X connect 29 0 30 0;
#X connect 31 0 3 1;
#X connect 31 0 36 1;
#X connect 32 0 21 0;
#X connect 35 0 37 0;
#X connect 36 0 9 1;
#X connect 37 0 28 0;
#X connect 38 0 17 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list