<?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 Fun w/SAS ODS Graphics: Total Ellipse of the Heart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858754#M23505</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EllipseHeart.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80401i5D20DCD1CA44FD9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="EllipseHeart.png" alt="EllipseHeart.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inspired by Amanda Newton's clever &lt;A href="http://jwilson.coe.uga.edu/EMAT6680Su10/Newton/emat6690/Hearts/Hearts.html" target="_self"&gt;The Heart of Mathematics&lt;/A&gt; (Valentine's Day Heart), here's how to turn two ellipses into two hearts. Happy Valentine's Day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: Total Ellipse of the Heart (Two Tilted Ellipses = Two Hearts)
  SAS implementation of Amanda Newton's clever "The Heart of Mathematics (Valentine's Day Heart)"
  http://jwilson.coe.uga.edu/EMAT6680Su10/Newton/emat6690/Hearts/Hearts.html;

data heart;                                                                    * Display "Happy Valentine's Day at (0,0);
retain x y 0 msg "HAPPY*VALENTINE'S*DAY!"; 

proc sgplot data=heart noborder nowall noautolegend aspect=1;                  * Plot two intersecting ellipses at +/- 45 degrees to make upright and upside-down hearts;
ellipseparm semimajor=1 semiminor=.6 / slope=1 xorigin=0 yorigin=0 lineattrs=(color=red)  lineattrs=(thickness=3pt) nofill fillattrs=(color=cxC3540C); * Ellipse 1, angled at 45 degrees;
ellipseparm semimajor=1 semiminor=.6 / slope=-1 xorigin=0 yorigin=0 lineattrs=(color=red) lineattrs=(thickness=3pt) nofill fillattrs=(color=cxC3540C); * Ellipse 2, angled at -45 degrees;
text x=x y=y text=msg / textattrs=(size=22pt weight=bold color=red) splitchar='*' splitpolicy=splitalways contributeoffsets=none; * "Happy Valentine's Day!" message;
xaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
yaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
refline 0 / axis=x lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
refline 0 / axis=y lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Feb 2023 15:23:10 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2023-02-14T15:23:10Z</dc:date>
    <item>
      <title>Fun w/SAS ODS Graphics: Total Ellipse of the Heart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858754#M23505</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EllipseHeart.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80401i5D20DCD1CA44FD9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="EllipseHeart.png" alt="EllipseHeart.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inspired by Amanda Newton's clever &lt;A href="http://jwilson.coe.uga.edu/EMAT6680Su10/Newton/emat6690/Hearts/Hearts.html" target="_self"&gt;The Heart of Mathematics&lt;/A&gt; (Valentine's Day Heart), here's how to turn two ellipses into two hearts. Happy Valentine's Day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: Total Ellipse of the Heart (Two Tilted Ellipses = Two Hearts)
  SAS implementation of Amanda Newton's clever "The Heart of Mathematics (Valentine's Day Heart)"
  http://jwilson.coe.uga.edu/EMAT6680Su10/Newton/emat6690/Hearts/Hearts.html;

data heart;                                                                    * Display "Happy Valentine's Day at (0,0);
retain x y 0 msg "HAPPY*VALENTINE'S*DAY!"; 

proc sgplot data=heart noborder nowall noautolegend aspect=1;                  * Plot two intersecting ellipses at +/- 45 degrees to make upright and upside-down hearts;
ellipseparm semimajor=1 semiminor=.6 / slope=1 xorigin=0 yorigin=0 lineattrs=(color=red)  lineattrs=(thickness=3pt) nofill fillattrs=(color=cxC3540C); * Ellipse 1, angled at 45 degrees;
ellipseparm semimajor=1 semiminor=.6 / slope=-1 xorigin=0 yorigin=0 lineattrs=(color=red) lineattrs=(thickness=3pt) nofill fillattrs=(color=cxC3540C); * Ellipse 2, angled at -45 degrees;
text x=x y=y text=msg / textattrs=(size=22pt weight=bold color=red) splitchar='*' splitpolicy=splitalways contributeoffsets=none; * "Happy Valentine's Day!" message;
xaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
yaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
refline 0 / axis=x lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
refline 0 / axis=y lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2023 15:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858754#M23505</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2023-02-14T15:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/SAS ODS Graphics: Total Ellipse of the Heart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858764#M23506</link>
      <description>&lt;P&gt;Cute, as usual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use a different scaling than newton's article, so I just eyeballed the following enhancement to your graph. I think adding fill helps to see the heart inside of the ellipses:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data heart;                                                                    * Display "Happy Valentine's Day at (0,0);
retain x y 0 msg "HAPPY*VALENTINE'S*DAY!"; 
do hx = -1.2 to 1.2 by 0.025;
   do hy = -1 to 1.2 by 0.025;
      if (hx**2 + hy**2 - hy*abs(hx) &amp;lt; 1) then do;
          xx = 0.71*hx;
          yy = 0.71*hy;
          output;
      end;
   end;
end;
drop hx hy;
run;

title "Total Ellipse of the Heart";
proc sgplot data=heart noborder nowall noautolegend aspect=1;                  * Plot two intersecting ellipses at +/- 45 degrees to make upright and upside-down hearts;
scatter x=xx y=yy / markerattrs=(color=pink symbol=SquareFilled size=9);
ellipseparm semimajor=1 semiminor=.6 / slope=1 xorigin=0 yorigin=0 lineattrs=(color=red)  lineattrs=(thickness=4pt) nofill fillattrs=(color=cxC3540C); * Ellipse 1, angled at 45 degrees;
ellipseparm semimajor=1 semiminor=.6 / slope=-1 xorigin=0 yorigin=0 lineattrs=(color=red) lineattrs=(thickness=4pt) nofill fillattrs=(color=cxC3540C); * Ellipse 2, angled at -45 degrees;
text x=x y=y text=msg / textattrs=(size=22pt weight=bold color=red) splitchar='*' splitpolicy=splitalways contributeoffsets=none; * "Happy Valentine's Day!" message;
xaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
yaxis display=(nolabel noline noticks) values=(-1 to 1 by .5) valueattrs=(size=7pt color=blue) grid gridattrs=(color=lightblue) minorgrid minorgridattrs=(color=lightblue) minorcount=4;
refline 0 / axis=x lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
refline 0 / axis=y lineattrs=(color=blue thickness=1pt); * Reference lines thru (0,0);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rick_SAS_0-1676390893287.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80403iFABE25EB5881B3D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Rick_SAS_0-1676390893287.png" alt="Rick_SAS_0-1676390893287.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858764#M23506</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-02-14T16:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/SAS ODS Graphics: Total Ellipse of the Heart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858774#M23508</link>
      <description>&lt;P&gt;Thaks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; - that is much better!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/858774#M23508</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2023-02-14T16:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/SAS ODS Graphics: Total Ellipse of the Heart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/914933#M24311</link>
      <description>&lt;P&gt;I made a note to myself to revisit this idea for Valentine's Day 2024. The result is this article:&lt;/P&gt;
&lt;P&gt;The elliptical heart:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2024/02/07/elliptical-heart.html" target="_self"&gt;https://blogs.sas.com/content/iml/2024/02/07/elliptical-heart.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EllipseHeart5.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93352iAE02E38EABCAB66D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EllipseHeart5.png" alt="EllipseHeart5.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EllipseHeart4.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93353iB0B13B52A9DF1EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EllipseHeart4.png" alt="EllipseHeart4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 19:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-SAS-ODS-Graphics-Total-Ellipse-of-the-Heart/m-p/914933#M24311</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-02-07T19:56:29Z</dc:date>
    </item>
  </channel>
</rss>

