[PD] Gem: Turning a cylinder inside out

Frank Barknecht fbar at footils.org
Thu Mar 16 01:43:14 CET 2006


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

> 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.)

Nevermind, I found a solution by scaling the cyliner with -1. However
it feels like a hack: Shouldn't the cylinder be turned inside out as
default? (Fixed patch attached.)

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 308 222 cylinder 1 20;
#X obj 308 422 sphere 1 20;
#X msg 503 205 draw line;
#X msg 574 205 draw fill;
#X msg 33 211 0 \, destroy;
#X obj 33 244 gemwin;
#X obj 308 312 sphere 1 20;
#X obj 308 263 separator;
#X obj 308 371 separator;
#X obj 220 56 gemhead;
#X obj 308 158 separator;
#X obj 220 131 rotateXYZ 0 0 0;
#X floatatom 289 80 5 0 0 0 - - -;
#X floatatom 335 79 5 0 0 0 - - -;
#X floatatom 313 59 5 0 0 0 - - -;
#X obj 220 79 scaleXYZ;
#X msg 33 186 reset \, lighting 1 \, create \, 1;
#X obj 308 288 translateXYZ 0 0 1;
#X obj 308 396 translateXYZ 0 0 -1;
#X floatatom 513 128 5 0 10 2 length - -;
#X obj 308 186 scaleXYZ 1 1 -1;
#X obj 437 162 * -1;
#X floatatom 441 125 5 0 0 2 radius - -;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 7 0 5 0;
#X connect 8 0 5 0;
#X connect 9 0 10 0;
#X connect 12 0 22 0;
#X connect 13 0 23 0;
#X connect 14 0 20 0;
#X connect 15 0 25 0;
#X connect 16 0 15 0;
#X connect 16 0 12 0;
#X connect 16 0 13 0;
#X connect 17 0 16 1;
#X connect 18 0 16 2;
#X connect 19 0 17 0;
#X connect 19 0 18 0;
#X connect 20 0 16 0;
#X connect 21 0 10 0;
#X connect 22 0 11 0;
#X connect 23 0 6 0;
#X connect 24 0 22 3;
#X connect 24 0 26 0;
#X connect 25 0 5 0;
#X connect 26 0 23 3;
#X connect 26 0 25 3;
#X connect 27 0 25 2;
#X connect 27 0 25 1;
#X connect 27 0 11 1;
#X connect 27 0 6 1;


More information about the Pd-list mailing list