3D part design with OpenSCAD # 150: A SunRay generator.

3D part design with OpenSCAD # 150: A SunRay generator.

Recently I wanted to make a sunray design for a project and I couldn't find any options online so I made one.

Here is the code:

//
/*[Pattern]*/
 Steps=5;//[1:1:9]
 Height=12;//[.1:.01:100]
 Edge_size=.1;//[.1:.01:60]
 Edge_shape=4;//[3:1:60]
 Edge_rotate=0;//[0:.01:180]
 RotateX=1;//[1:1:89]
 RotateY=1;//[1:1:89]
 Outside_shape=3;//[3:1:12]
 Extrude_scale=4;//[1:.01:20]

/*[Scaling]*/
 Resize=100;//[1:.01:200]

module SunRay(){
 for(a=[0:Steps:90]){
  minkowski(){
  rotate([RotateX,RotateY,Edge_rotate])
  sphere(Edge_size,$fn=Edge_shape);
  rotate([0,0,a*15])
  linear_extrude(Height-.20,scale=Extrude_scale)
  rotate([RotateX,RotateY,0])
  circle(20,$fn=Outside_shape);
}}}

 mirror([0,0,1])
 translate([0,0,-Height])
 resize([Resize,0,0], auto=[true,true,false])
 SunRay();

Here are some designs I made by adjusting the variables: