<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fun With SAS ODS Graphics: Drawing Mickey Mouse is as Easy as 1-2-3 (Ellipses) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/329034#M11516</link>
    <description>&lt;P&gt;Wow! So Awesome!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2017 10:54:16 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2017-02-01T10:54:16Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Drawing Mickey Mouse is as Easy as 1-2-3 (Ellipses)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/328268#M11513</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6976iD0C93803AE6CE2C2/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="MICKEY.png" title="MICKEY.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just registered for &lt;A href="http://www.sas.com/en_us/events/sas-global-forum/sas-global-forum-2017.html" target="_self"&gt;SAS Global Forum 2017&lt;/A&gt; at Walt Disney World in Orlando, so to mark the occasion, here's a quick SAS ODS Graphics take on the &lt;A href="https://family.disney.com/craft/mickey-mouse-template/" target="_self"&gt;Mickey Mouse Template&lt;/A&gt; provided by &lt;EM&gt;Disney Family&lt;/EM&gt;. Hope to M-I-C some of you in April!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* SAS ODS Graphics take on Mickey Mouse silhouette from family.disney.com/craft/mickey-mouse-template/;

data mickey;                                             * Generate chart data (grab coordinates from MS-Paintbrush);
imageSizeX=680; imageSizeY=593;                          * Image template width/height (px);

faceOriginX=340; faceOriginY=366;                        * Face points (circle);
faceTopCenterX=340; faceTopCenterY=147;
faceRadius=faceOriginY-faceTopCenterY;                   * Calculate face radius;
label="SGF 2017";                                        * Label for face;

leftEarOriginX=131; leftEarOriginY=131;                  * Left ear points (ellipse);
leftEarLeftCenterX=40; leftEarLeftCenterY=238;
leftEarTopCenterX=43; leftEarTopCenterY=49;              * Calculate left ear semimajor/semiminor lengths, slope;
leftEarSemiMajor=sqrt((leftEarOriginX-leftEarLeftCenterX)**2+(leftEarOriginY-leftEarLeftCenterY)**2);
leftEarSemiMinor=sqrt((leftEarOriginX-leftEarTopCenterX)**2+(leftEarOriginY-leftEarTopCenterY)**2);
leftEarSlope=-(leftEarLeftCenterY-leftEarOriginY)/(leftEarLeftCenterX-leftEarOriginX);

rightEarOriginX=551; rightEarOriginY=139;                * Right ear points (ellipse);
rightEarLeftCenterX=462; rightEarLeftCenterY=35;
rightEarTopCenterX=637; rightEarTopCenterY=52;           * Calculate right ear semimajor/semiminor lengths, slope;
rightEarSemiMajor=sqrt((rightEarOriginX-rightEarLeftCenterX)**2+(rightEarOriginY-rightEarLeftCenterY)**2);
rightEarSemiMinor=sqrt((rightEarOriginX-rightEarTopCenterX)**2+(rightEarOriginY-rightEarTopCenterY)**2);
rightEarSlope=-(rightEarLeftCenterY-rightEarOriginY)/(rightEarLeftCenterX-rightEarOriginX);

faceOriginY=imageSizeY-faceOriginY;                      * Adjust y-coordinates from top=0 to bottom=0;
leftEarOriginY=imageSizeY-leftEarOriginY;
leftEarTopCenterY=imageSizeY-leftEarTopCenterY;
rightEarOriginY=imageSizeY-rightEarOriginY;
rightEarTopCenterY=imageSizeY-rightEarTopCenterY;        

ods listing image_dpi=300 gpath='/folders/myfolders';    * Plot Mickey Mouse silhouette;
ods graphics on / reset antialias width=5in height=5in imagename="MICKEY";
proc template;
 define statgraph ellipseparm;
 begingraph; 
   entrytitle "M-I-C...SEE YOU REAL SOON!";     
   layout overlayequated /  
     xaxisopts=(display=(line ticks tickvalues) offsetmin=0.05 offsetmax=0.05)
     yaxisopts=(display=(line ticks tickvalues) offsetmin=0.05 offsetmax=0.05);
     ellipseparm xorigin=faceOriginX yorigin=faceOriginY              /* FACE */      
                 semimajor=faceRadius semiminor=faceRadius slope=0 /
                 fillattrs=(color=black) display=(fill);
     ellipseparm xorigin=leftEarOriginX yorigin=leftEarOriginY        /* LEFT EAR */ 
                 semimajor=leftEarSemiMajor semiminor=leftEarSemiMinor slope=leftEarSlope /
                 fillattrs=(color=black) display=(fill);
     ellipseparm xorigin=rightEarOriginX yorigin=rightEarOriginY      /* RIGHT EAR */ 
                 semimajor=rightEarSemiMajor semiminor=rightEarSemiMinor slope=rightEarSlope /
                 fillattrs=(color=black) display=(fill);
     textplot x=faceOriginX y=faceOriginY text=label /                /* LABEL */
                 position=center textattrs=(color=white size=28pt weight=bold);
   endlayout;
  endGraph;
 end;
run;
proc sgrender data=mickey template=ellipseparm;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;A NOTE ON DETERMINING POINT COORDINATES&lt;/STRONG&gt;&lt;BR /&gt;So, was it difficult to find the coordinates of the points needed for the above chart? Not at all! Just cut-and-pasted the Disney-provided Mickey Mouse Template into Microsoft Paintbrush, drew a few lines to bisect the "face" and "ears", and hovered over the 8 needed points (starred below) to display the coordinates in the status bar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6977iEB72F65A4017E0A7/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="MickeyPaintbrush.png" title="MickeyPaintbrush.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2017 01:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/328268#M11513</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2017-01-29T01:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: Drawing Mickey Mouse is as Easy as 1-2-3 (Ellipses)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/328275#M11514</link>
      <description>&lt;P&gt;Awesome as always &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;!!!&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2017 05:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/328275#M11514</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2017-01-29T05:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: Drawing Mickey Mouse is as Easy as 1-2-3 (Ellipses)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/329034#M11516</link>
      <description>&lt;P&gt;Wow! So Awesome!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 10:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Drawing-Mickey-Mouse-is-as-Easy-as-1-2/m-p/329034#M11516</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2017-02-01T10:54:16Z</dc:date>
    </item>
  </channel>
</rss>

