Index: graphics.awk =================================================================== --- graphics.awk (revision 27761) +++ graphics.awk (revision 27762) @@ -15,7 +15,7 @@ } # Archimedean spirals -function a_spiral(xcen ,ycen, radius, inradius, turns, sides, phase) +function ar_spiral(xcen ,ycen, radius, inradius, turns, sides, phase) { if (sides+0 < 3){ message ("must have 3 or more sides") @@ -41,7 +41,9 @@ spiral_length = 0 } -function drawpoly(xcen,ycen, sides, side_length, circumradius,rot_angle) # side_length, rot_deg, apothem, circumradius) +# draw regular concave polygons +function poly_trace(xcen,ycen, sides, side_length, circumradius,rot_angle) # TODO:rot_deg, apothem) + { pi = 3.141592654 segment_angle = 2*3.14159264/sides @@ -57,6 +59,7 @@ return 0 } # check if too many inputs exist, make sure the others don't + message("circumradius is: " circumradius) if (circumradius != ""){ if (side_length != 0 ){ message ("give one input total for inputs side_length and circumradius") @@ -92,9 +95,9 @@ delete yvert } +# other types of spiral: fixed width # other funcition ideas -- oval (coefficients for x or y) # square with curved corners (can we draw arcs yet?) -# line spirals (square spirals) function deg_to_rad(angle){ rad = ( angle * 2 * 3.14159264 ) / 360 @@ -104,6 +107,6 @@ BEGIN { fgw_func_reg("rules") - fgw_func_reg("a_spiral") - fgw_func_reg("drawpoly") + fgw_func_reg("ar_spiral") + fgw_func_reg("poly_trace") }