BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

OdsXmasTree.png

data xmastree;
r=4; h=11.25;
a=arsin(r/(r**2+h**2)**.5);
do y=-r to r by .02;
  do x=-r to r by .02;
    z=h-(x**2+y**2)**.5/sin(a)*cos(a);
    if (x**2+y**2)**.5>4 | 1.25<z<2|3.25<z<4|5.25<z<6|7.25<z<8|9.25<z<10 then z=.; 
    output;
  end;
end;

proc template;
define statgraph xmastree;
begingraph;
drawtext textattrs=(size=50pt COLOR=gold FAMILY="Arial Unicode MS") {unicode "2605"x} /
         anchor=topleft widthunit=percent x=46.5 y=99 justify=center ;
layout overlay3d / cube=false;
surfaceplotparm x=x y=y z=z / fillattrs=(color=forestgreen);
endlayout;
endgraph;
end;

proc sgrender data=xmastree template=xmastree;
run;
3 REPLIES 3
Jay54
Meteorite | Level 14

Very cool, indeed.

SASKiwi
PROC Star

Nice. I think it is right up there with the cowboy hat!

MichelleHomes
Meteorite | Level 14

An awesome trignometric SASmas tree! Smiley Happy Heart Nice work.

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2651 views
  • 9 likes
  • 4 in conversation