[PD] Gem: Turning a cylinder inside out

Frank Barknecht fbar at footils.org
Thu Mar 16 01:31:12 CET 2006


Hi,

I would like to draw a cylinder in Gem whose ends are closed with
spherical caps. The basic geometry is easy: I just make a cylinder and
put a sphere at each end.

However the shadows, when lighting is turned on, look very wrong: The
cylinder has the shadow on the other side compared to the spheres. Is
there a way to fix this? (See attached example patch.)

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 519 195 653 503 10;
#X obj 56 45 gemhead;
#X obj 56 107 world_light;
#X obj 56 79 rotateXYZ 0 -120 0;
#X obj 57 132 gemhead;
#X obj 57 152 world_light;
#X obj 348 220 cylinder 1 20;
#X text 282 28 Upright cylinder along y-axis;
#X obj 348 286 translateXYZ 0 1 0;
#X obj 348 420 sphere 1 20;
#X obj 348 394 translateXYZ 0 -1 0;
#X msg 473 203 draw line;
#X msg 544 203 draw fill;
#X floatatom 428 260 5 0 0 0 - - -;
#X msg 50 381 0 \, destroy;
#X obj 50 414 gemwin;
#X obj 348 310 sphere 1 20;
#X floatatom 475 184 5 0 0 0 - - -;
#X obj 348 261 separator;
#X obj 348 369 separator;
#X obj 260 54 gemhead;
#X obj 348 156 separator;
#X obj 260 129 rotateXYZ 0 0 0;
#X floatatom 331 99 5 0 0 0 - - -;
#X floatatom 377 98 5 0 0 0 - - -;
#X floatatom 355 78 5 0 0 0 - - -;
#X obj 260 77 scaleXYZ;
#X obj 348 184 rotateXYZ 90 0 0;
#X msg 50 356 reset \, lighting 1 \, create \, 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 7 0 15 0;
#X connect 9 0 8 0;
#X connect 10 0 5 0;
#X connect 11 0 5 0;
#X connect 12 0 7 2;
#X connect 13 0 14 0;
#X connect 16 0 5 1;
#X connect 17 0 7 0;
#X connect 18 0 9 0;
#X connect 19 0 25 0;
#X connect 20 0 26 0;
#X connect 21 0 20 0;
#X connect 21 0 17 0;
#X connect 21 0 18 0;
#X connect 22 0 21 1;
#X connect 23 0 21 3;
#X connect 24 0 22 0;
#X connect 24 0 23 0;
#X connect 25 0 21 0;
#X connect 26 0 5 0;
#X connect 27 0 14 0;


More information about the Pd-list mailing list