diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-04-13 03:47:20 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-04-13 03:47:20 +0000 |
commit | 480b757207c659f0c3e06277e29733b52d46bcdc (patch) | |
tree | 63b412810be7243aa2259207b21623edb7eba400 /hid_polar.pd | |
parent | 132e0237c9d00eab8c3cb7a45bdc493c0166373a (diff) |
- created a suite of hid objects for using polar coordinates and converting
between the range of 0-1 and degrees/radians.
- made two joystick/polar examples
- added some pretty colors to help patches
svn path=/trunk/externals/hcs/hid/; revision=2754
Diffstat (limited to 'hid_polar.pd')
-rw-r--r-- | hid_polar.pd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/hid_polar.pd b/hid_polar.pd new file mode 100644 index 0000000..5b28852 --- /dev/null +++ b/hid_polar.pd @@ -0,0 +1,39 @@ +#N canvas 328 234 464 407 10; +#X obj 30 58 inlet; +#X obj 25 323 outlet; +#X text 73 323 output range: 0 to 1; +#X text 72 57 input range: 0 to 1; +#X text 11 5 [hid_polar]; +#X obj 232 322 outlet; +#X obj 224 56 inlet; +#X text 264 57 input range: 0 to 1; +#X text 29 29 x-axis value; +#X text 221 26 y-axis value; +#X obj 25 292 / 1.41421; +#X text 92 292 (sqrt 2); +#X obj 104 220 cart2pol; +#X obj 223 85 t b f; +#X obj 29 180 f; +#X obj 252 140 - 1; +#X obj 252 120 * 2; +#X obj 29 140 - 1; +#X obj 29 120 * 2; +#X text 61 125 convert range to -1 to 1; +#X text 280 322 output range: 0 to 1; +#X text 245 371 released under the GNU GPL; +#X text 28 357 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at> +; +#X obj 231 290 rad2hid; +#X connect 0 0 18 0; +#X connect 6 0 13 0; +#X connect 10 0 1 0; +#X connect 12 0 10 0; +#X connect 12 1 23 0; +#X connect 13 0 14 0; +#X connect 13 1 16 0; +#X connect 14 0 12 0; +#X connect 15 0 12 1; +#X connect 16 0 15 0; +#X connect 17 0 14 0; +#X connect 18 0 17 0; +#X connect 23 0 5 0; |