Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!uwmcsd1!bbn!rochester!pt.cs.cmu.edu!spice.cs.cmu.edu!spe From: spe@spice.cs.cmu.edu (Sean Engelson) Newsgroups: comp.windows.news Subject: Yin/Yang root image---with a twist Message-ID: <2262@pt.cs.cmu.edu> Date: 13 Jul 88 14:54:38 GMT Sender: netnews@pt.cs.cmu.edu Reply-To: spe@spice.cs.cmu.edu (Sean Engelson) Organization: Carnegie-Mellon University, CS/RI Lines: 89 Keywords: % This program changes the root image to a Yin/Yang symbol on a purplish % background. It also, if you want, will set the symbol to spin % around its centre. Quite pretty. % Created by Sean P. Engelson % Spinning thought of by John Kolojejchick systemdict begin % Draw a yin/yang (just some arcs and fills) /yinyang { % angle x y => __ translate 40 40 scale 10 10 translate rotate -10 -10 translate 1 setgray newpath 10 10 10 0 180 arcn 5 10 5 180 0 arc 15 10 5 180 0 arcn fill 0 setgray newpath 10 10 10 0 180 arc % big arc black side 5 10 5 180 0 arc % black bulge 15 10 5 180 0 arcn % white bulge fill gsave 4 10 moveto newpath 5 10 1 0 360 arc 1 setgray fill grestore newpath 10 10 10 0 360 arc stroke newpath 14 10 moveto newpath 15 10 1 0 360 arc 0 setgray fill } def % angle to draw it at /YinYangAng 0 def % Draw it on the root /RootYinYang { gsave framebuffer setcanvas 0 0 1200 1200 rectpath .5 .5 1 setrgbcolor fill YinYangAng 160 60 yinyang grestore } def /PaintRoot /RootYinYang load store PaintRoot end % Set the yin/yang to spin by queuing events. /TimeYinYang { { /d 2 dict dup begin /RotateYinYang { /YinYangAng YinYangAng 5 add store % change the 5 to adjust % the speed gsave framebuffer setcanvas YinYangAng 160 60 yinyang grestore SendNewYinYangEvent } def end def /e1 createevent def e1 /Name d put e1 expressinterest /SendNewYinYangEvent { e1 createevent copy dup begin /Name /RotateYinYang def /TimeStamp currenttime .05 add def end sendevent } def SendNewYinYangEvent { awaitevent } loop } fork } def % If you don't want it to spin, comment this next line: TimeYinYang