[Pd] drawing a circle with data structures

Frank Barknecht fbar at footils.org
Thu May 25 14:00:53 CEST 2006


Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> Hallo,
> Chuckk Hubbard hat gesagt: // Chuckk Hubbard wrote:
> 
> > I thought so.  The points fed to Pd aren't actually on the circle it
> > draws.  w isn't really the radius.
> > 
> > I changed a few things to show it.
> 
> Yes, see my other mail: the w-field is 0.92 of the real radius.
> That's simply because Miller and me are lazy when calculating sines
> and cosines. 

I changed more things to show it.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 14 5 543 376 10;
#N canvas 56 267 728 533 mass 0;
#X msg 163 395 traverse \$1 \, bang;
#X obj 63 350 inlet;
#X obj 163 416 pointer;
#X obj 166 229 filledcurve 900 0 1 w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:92)
w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:-38) w(0:100)(0:38) w(0:100)(0:-92)
w(0:100)(0:-38) w(0:100)(0:-92) w(0:100)(0:-92) w(0:100)(0:-38) w(0:100)(0:-92)
w(0:100)(0:38) w(0:100)(0:-38) w(0:100)(0:92);
#X obj 63 371 list split 3;
#X obj 169 142 drawpolygon 9 2 w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:92)
w(0:100)(0:38) w(0:100)(0:92) w(0:100)(0:-38) w(0:100)(0:38) w(0:100)(0:-92)
w(0:100)(0:-38) w(0:100)(0:-92) w(0:100)(0:-92) w(0:100)(0:-38) w(0:100)(0:-92)
w(0:100)(0:38) w(0:100)(0:-38) w(0:100)(0:92);
#X obj 169 108 inlet;
#X text 533 159 Outline;
#X text 540 262 Circle;
#X obj 63 445 append circle x y w;
#X obj 63 465 outlet;
#X text 301 80 Radius?;
#X obj 60 49 struct circle float x float y float w float r;
#X obj 278 101 drawpolygon 0 2 r(0:100)(0:-100) 0 r(0:100)(0:100) 0
;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 2 0 9 3;
#X connect 4 0 9 0;
#X connect 4 1 0 0;
#X connect 6 0 5 0;
#X connect 9 0 10 0;
#X restore 220 158 pd mass;
#N canvas 622 181 414 406 show 1;
#X restore 381 139 pd show;
#X msg 379 170 clear;
#X obj 379 196 s pd-show;
#X obj 264 137 tgl 15 0 empty empty show_outline 0 -6 0 8 -262144 -1
-1 0 1;
#X floatatom 135 143 5 0 0 0 radius - -;
#X text 219 84 Click me;
#X msg 220 105 200 200 80 pd-show;
#X obj 140 60 loadbang;
#X obj 135 267 set circle w r;
#X obj 135 168 t a a;
#X text 190 231 cos(360deg/16) =~ 0.92;
#X floatatom 84 267 5 0 0 0 width - -;
#X obj 135 228 / 0.92;
#X connect 0 0 9 2;
#X connect 2 0 3 0;
#X connect 4 0 0 1;
#X connect 5 0 10 0;
#X connect 7 0 0 0;
#X connect 8 0 7 0;
#X connect 10 0 13 0;
#X connect 10 1 9 1;
#X connect 13 0 9 0;
#X connect 13 0 12 0;


More information about the Pd-list mailing list