Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!ucbvax!icsia!fanty From: fanty@icsia.berkeley.edu (Mark Fanty) Newsgroups: comp.windows.news Subject: smooth motion in Huxtable's eye.ps Keywords: animation, NeWS Message-ID: <25274@ucbvax.BERKELEY.EDU> Date: 28 Jul 88 17:53:09 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: fanty@icsi.berkeley.edu (Mark Fanty) Organization: International Computer Science Institute Lines: 37 NeWS animation which erases the old image before drawing the new one often has an unpleasant flickering. I liked Jeremy Huxtable's recently posted eye.ps (Re: Big brother) so much I decided to attempt a fix for the eyeballs. My solution uses clipping to avoid erasing any part of what will be the new eyeball. The new painteyeball is /painteyeball { % x y colour => setgray exch atan /angle exch def angle cos .2 mul angle sin .2 mul 2 copy 2 copy Transform gsave 0 0 .45 0 360 arc clip % avoid border % clip around new eye before erasing to avoid flicker .15 0 360 arc .8 0 360 arc eoclip backgroundcolor fillcanvas grestore .15 0 360 arc fill } def Also, remove the line EyeX EyeY 1 painteyeball in the mouse event manager. Mark Fanty International Computer Science Institute 1947 Center Street., Suite 600 Berkeley, CA 94704 (415) 643-7294 fanty@icsi.berkeley.edu