# levcap-relief.prl # print "* The following was generated by program levcap-relief.prl\n"; print "* X and Z coordinates to cut a curved relief\n"; print "* in the bottom of a lever cap, using 1/2\" ball end mill\n"; print "* Refer to dwg. yehle13.vlm\n"; # $incl_angle = 25.59; # included angle: 25.59 degrees left, to vertical # then the same from vertical to 25.59 right $pi = 3.1419265358979323; #close enough $n_steps = 18; # 9 steps is about .04/pass # for ($i=$n_steps; $i>=-$n_steps; $i = $i-1) { $degrees = $incl_angle * $i / $n_steps; $a = $degrees * $pi / 180; #radians $x = .5718 - .9571 * sin($a); $z = 1.0852 - .9571*cos($a) - .25; # printf "a = %-6.2f x = %-7.4f z = %-7.4f\n", $degrees, $x, $z; printf "Rapid X %-6.4f Z %-7.4f\n", $x, $z; print "Call 1\n"; } print "* End of output produced by levcap-relief.prl\n";