marshall@software.ORG (Eric Marshall) (04/21/88)
Does anyone have a PostScript program to draw the Sun logo? I made one myself, and it looks real good, but I was hoping to get a more accurate specification. Thanks in advance. Eric Marshall Software Productivity Consortium 1880 North Campus Commons Drive Reston, VA 22091 (703) 391-1838 CSNET: marshall@software.org ARPANET: marshall%software.org@relay.cs.net OR @relay.cs.net:marshall@software.org
bill@denali.UUCP (Bill Meine [Sun Rocky Mtn TSE]) (04/21/88)
Here's the one I use. Some of the transformations are fairly ugly (it was derived from someone elses code). It acts as a primitive that requires a newpath before and adds a sun logo to the currentpath to use for whatever (even a canvas boundary). /Sunlogo { % xcenter ycenter s = - 3 1 roll % s xcenter ycenter matrix currentmatrix 4 1 roll % matrix s xcenter ycenter translate % matrix s 16 dup mul 2 div sqrt div % s will now represent total height dup scale % matrix 0 3 dup mul 2 mul sqrt neg translate % new starting point from center 45 rotate /Uchar { -.1 0 moveto 0 0 .1 180 360 arc 0 2.9 rlineto .8 0 rlineto 0 -2.9 rlineto 0 0 .9 0 180 arcn 0 2.9 rlineto .8 0 rlineto closepath } def /2Uchar { Uchar matrix currentmatrix 4 4 translate Uchar setmatrix } def 4 { 2Uchar 6 0 translate 90 rotate } repeat setmatrix % restore original CTM } def Try (from psh): newpath 100 100 150 Sunlogo gsave 1 setgray fill grestore stroke -Bill
leres@ucbarpa.Berkeley.EDU (Craig Leres) (04/22/88)
Here's my Sun logo. I wrote it for Postscript not NeWS, but in fact used NeWS to preview it. To display it, I use something like: gsave 4 inch dup translate sun grestore Enjoy. Craig ------ % @(#) $Header: sun.ps,v 1.2 87/08/23 19:36:33 leres Exp $ (LBL) % % Draw the Sun logo, scaled for one inch by one inch % /sundict 21 dict def /sun { sundict begin gsave % Defines /inch { 72 mul } bind def /mm { 2.834 mul } bind def /thick 42 mm def /width 400 mm def /realwidth 2 width mul 2 sqrt div def /rb 46.5 mm def /ra rb thick sub def /x1 0 mm def /x4 195 mm def /x2 x4 rb sub def /x3 x2 ra add def /y1 0 mm def /y2 thick def /y3 thick ra add def /y5 rb dup add def /y4 y5 thick sub def % Scale to one inch, position, and rotate. 1 inch realwidth div dup scale realwidth 2 div 0 translate 45 rotate % One Sun segment. /fnord { newpath 0 setlinewidth 0 0 moveto x4 y1 x4 y3 rb arcto 4 {pop} repeat x4 y5 x3 y5 rb arcto 4 {pop} repeat x1 y5 lineto x1 y4 lineto x3 y4 x3 y3 ra arcto 4 {pop} repeat x3 y2 x2 y2 ra arcto 4 {pop} repeat x1 y2 lineto closepath fill } def % Two Sun segment. /gronk { fnord gsave x4 dup translate 180 rotate fnord grestore } def gsave x4 0 translate 90 rotate gronk grestore gsave width x4 sub 0 translate gronk grestore gsave 0 width x4 sub translate gronk grestore gsave width width x4 sub translate 90 rotate gronk grestore grestore end } def
leres@ucbarpa.Berkeley.EDU (Craig Leres) (04/29/88)
For the numerous Postscript illiterates out there, you must append: /inch { 72 mul } bind def gsave 4 inch dup translate sun grestore showpage to the Sun logo Postscript code I recently posted before spooling to a Laserwriter. To make the logo larger, insert a "2 dup scale" or "4 dup scale" before the translate line. Craig