<?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 With SAS ODS Graphics: Oh, What a Tangled Halloween Web We Weave! in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Oh-What-a-Tangled-Halloween-Web-We/m-p/949149#M25093</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HalloweenWeb.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101821i56C4CF18DD65B52A/image-size/large?v=v2&amp;amp;px=999" role="button" title="HalloweenWeb.png" alt="HalloweenWeb.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Trick-Or-Treat time coming up, here's a SAS ODS Graphics spider web spun from polygon, vector, and scatter plots using a formula found in&amp;nbsp;&lt;A href="https://www.researchgate.net/publication/43021747_Simple_Model_for_the_Mechanics_of_Spider_Webs" target="_self"&gt;Simple Model for the Mechanics of Spider Webs&lt;/A&gt;. Happy Halloween, all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Oh What a Tangled Halloween Web We Weave
  Draws inspiration (and math!) from researchgate.net/publication/43021747_Simple_Model_for_the_Mechanics_of_Spider_Webs;

data spiderweb;                   * Generate points for spider web and spiders;
pi=constant("pi");
capM=4;                           * M=4 concentric polygons (spiral threads);
capN=10;                          * N=10 points for each polygon (radial threads);
L=1;                              * L=1 space between each polygon;
do m=1 to capM;                   * Generate polygon points (M polygons of N points);
  do n=1 to capN;
    theta=2*n*pi/capN;            * Polar coordinates (r, theta) = (m*L, 2*n*PI/N);
    r=m*L;                        
    x=r*cos(theta);               * Convert to x, y coordinates;
    y=r*sin(theta);
    output;
  end;
end;

m=.; x=.; y=.;
do n=1 to capN;                   * Generate points for N radial lines;      
  theta=2*n*pi/capN;              * Polar coordinates;
  r=capM*L+.1*capM/L;
  x2=r*cos(theta);                * Convert to x, y coordinates;
  y2=r*sin(theta);
  output;
end;

x2=.; y2=.;                       * Generate points for 5 spiders;  
y4=4.7;                           * y-coordinate for starting point of spiders' threads;   
x3=capM-2; y3=capM/-3; output;    * Five spiders;
x3=0; y3=capM/-1.5; output;
x3=3; y3=capM/2-1; output;
x3=-1.5; y3=-.5; output;
x3=-3; y3=1.5; output;
                                  * Let's weave a spider web with polygon, scatter, and vector plots!;
%sganno;                          * Use annotation to more precisely position title;    
data title;                              
%sgtext (label="HAPPY HALLOWEEN!", x1=50, y1=1, textsize=28, textweight='bold', anchor="bottom", x1space='layoutpercent', y1space='layoutpercent', width=100, widthunit='percent');
                              
ods graphics / width=5in height=6in noborder;
proc sgplot data=spiderweb aspect=1 noautolegend noborder nowall pad=0 sganno=title;
styleattrs backcolor=cxFF7518;                                  * cxFF7518 is Halloween orange;
symbolimage name=spider image="/home/ted.conway/spider.png";    * MS-Word spider icon saved as .png file;
polygon x=x y=y id=m / lineattrs=(color=white thickness=2.5pt); * Spiral threads;
vector x=x2 y=y2 / lineattrs=(color=white thickness=2.5pt);     * Radial threads;
scatter x=x y=y / markerattrs=(color=white) filledoutlinedmarkers markerfillattrs=(color=cxFF7518) markeroutlineattrs=(color=white thickness=2.5pt) markerattrs=(symbol=circlefilled size=9pt); * Show points;
scatter x=x3 y=y3 / markerattrs=(symbol=spider size=28pt);      * Spiders;
vector x=x3 y=y3 / xorigin=x3 yorigin=y4 noarrowheads lineattrs=(thickness=2.5pt); * Spider threads;
xaxis display=none offsetmin=0 offsetmax=0 values=(-4.7 4.7);   * Suppress and limit bounds of axes;
yaxis display=none offsetmin=0 offsetmax=0 values=(-4.7 4.7);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Oct 2024 20:31:17 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2024-10-27T20:31:17Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: Oh, What a Tangled Halloween Web We Weave!</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Oh-What-a-Tangled-Halloween-Web-We/m-p/949149#M25093</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HalloweenWeb.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/101821i56C4CF18DD65B52A/image-size/large?v=v2&amp;amp;px=999" role="button" title="HalloweenWeb.png" alt="HalloweenWeb.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Trick-Or-Treat time coming up, here's a SAS ODS Graphics spider web spun from polygon, vector, and scatter plots using a formula found in&amp;nbsp;&lt;A href="https://www.researchgate.net/publication/43021747_Simple_Model_for_the_Mechanics_of_Spider_Webs" target="_self"&gt;Simple Model for the Mechanics of Spider Webs&lt;/A&gt;. Happy Halloween, all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: Oh What a Tangled Halloween Web We Weave
  Draws inspiration (and math!) from researchgate.net/publication/43021747_Simple_Model_for_the_Mechanics_of_Spider_Webs;

data spiderweb;                   * Generate points for spider web and spiders;
pi=constant("pi");
capM=4;                           * M=4 concentric polygons (spiral threads);
capN=10;                          * N=10 points for each polygon (radial threads);
L=1;                              * L=1 space between each polygon;
do m=1 to capM;                   * Generate polygon points (M polygons of N points);
  do n=1 to capN;
    theta=2*n*pi/capN;            * Polar coordinates (r, theta) = (m*L, 2*n*PI/N);
    r=m*L;                        
    x=r*cos(theta);               * Convert to x, y coordinates;
    y=r*sin(theta);
    output;
  end;
end;

m=.; x=.; y=.;
do n=1 to capN;                   * Generate points for N radial lines;      
  theta=2*n*pi/capN;              * Polar coordinates;
  r=capM*L+.1*capM/L;
  x2=r*cos(theta);                * Convert to x, y coordinates;
  y2=r*sin(theta);
  output;
end;

x2=.; y2=.;                       * Generate points for 5 spiders;  
y4=4.7;                           * y-coordinate for starting point of spiders' threads;   
x3=capM-2; y3=capM/-3; output;    * Five spiders;
x3=0; y3=capM/-1.5; output;
x3=3; y3=capM/2-1; output;
x3=-1.5; y3=-.5; output;
x3=-3; y3=1.5; output;
                                  * Let's weave a spider web with polygon, scatter, and vector plots!;
%sganno;                          * Use annotation to more precisely position title;    
data title;                              
%sgtext (label="HAPPY HALLOWEEN!", x1=50, y1=1, textsize=28, textweight='bold', anchor="bottom", x1space='layoutpercent', y1space='layoutpercent', width=100, widthunit='percent');
                              
ods graphics / width=5in height=6in noborder;
proc sgplot data=spiderweb aspect=1 noautolegend noborder nowall pad=0 sganno=title;
styleattrs backcolor=cxFF7518;                                  * cxFF7518 is Halloween orange;
symbolimage name=spider image="/home/ted.conway/spider.png";    * MS-Word spider icon saved as .png file;
polygon x=x y=y id=m / lineattrs=(color=white thickness=2.5pt); * Spiral threads;
vector x=x2 y=y2 / lineattrs=(color=white thickness=2.5pt);     * Radial threads;
scatter x=x y=y / markerattrs=(color=white) filledoutlinedmarkers markerfillattrs=(color=cxFF7518) markeroutlineattrs=(color=white thickness=2.5pt) markerattrs=(symbol=circlefilled size=9pt); * Show points;
scatter x=x3 y=y3 / markerattrs=(symbol=spider size=28pt);      * Spiders;
vector x=x3 y=y3 / xorigin=x3 yorigin=y4 noarrowheads lineattrs=(thickness=2.5pt); * Spider threads;
xaxis display=none offsetmin=0 offsetmax=0 values=(-4.7 4.7);   * Suppress and limit bounds of axes;
yaxis display=none offsetmin=0 offsetmax=0 values=(-4.7 4.7);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 20:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-Oh-What-a-Tangled-Halloween-Web-We/m-p/949149#M25093</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2024-10-27T20:31:17Z</dc:date>
    </item>
  </channel>
</rss>

