Macsyma has a package of autoloading geometric formulae, e.g. (c2) area_regular_polygon(n,s) c:\macsyma\Macsyma2\share\geofuncs.fas being loaded. %pi 2 cot(---) n s n (d2) ------------- 4 but the regular polygon functions have two drawbacks: there are too many possible interconversions (e.g., inradius and side to area), and you can't remember which take which arguments (e.g., maybe that 2nd arg to area_regular_polygon was really the circumradius). Short of popping open a doc window, you can determine the argument semantics by loading the uncompiled package and peeking at the lhs of the definition: (c4) (load("c:\\macsyma\\Macsyma2\\share\\geofuncs.mac"), first(fundef(area_regular_polygon))) (d4) area_regular_polygon(numsides, edge) But that's gross. I wanted something like Dick Petti's contribution (c5) first(fundef(solve_triangle)) (d5) solve_triangle(arg1, arg2, arg3, problem_type) where the args are either angles or sides, and problem_type is ASA, SAS, etc. I finally wrote (c1) solve_regular_polygon() Batching the file c:\rwg\climax\share\geofuncs.mac %pi 2 %pi cot(---) n s csc(---) s n n (d1) [n = n, area = -------------, circumradius = ----------, 4 2 %pi %pi cot(---) s tan(---) s n 2 n inradius = ----------, perimeter = n s, sagitta = ----------, 2 2 side = s] As you see, with no args, it just recites the various dimensions in terms of the number of sides and side length. (c2) first(fundef(solve_regular_polygon)) (d2) solve_regular_polygon([n or n,side or eqns]) So you can supply one or both of these (c3) solve_regular_polygon(6) 2 3 sqrt(3) s (d3) [name = hexagon, n = 6, area = ------------, circumradius = s, 2 sqrt(3) s (2 - sqrt(3)) s inradius = ---------, perimeter = 6 s, sagitta = ---------------, 2 2 side = s] But you can also supply equations specifying the other properties: (c4) solve_regular_polygon(name = octagon,area = 1) 1/4 2 (d4) [name = octagon, n = 8, area = 1, circumradius = ----, 2 sqrt(2) sqrt(sqrt(2) + 1) inradius = -------------------------, 4 perimeter = 4 sqrt(sqrt(2) - 1) sqrt(2), %pi sqrt(sqrt(2) - 1) sqrt(2) tan(---) 16 sagitta = ----------------------------------, 4 sqrt(sqrt(2) - 1) sqrt(2) side = -------------------------] 2 (c5) solve_regular_polygon(radius = r,sagitta = r/2) 2 3 sqrt(3) r (d5) [name = equilateral_triangle, n = 3, area = ------------, 4 r r circumradius = r, inradius = -, perimeter = 3 sqrt(3) r, sagitta = -, 2 2 side = sqrt(3) r] Some answers can be neat: (c6) solve_regular_polygon(area = s^2,perimeter = 4*s) 2 sqrt(2) s (d6) [name = square, n = 4, area = s , circumradius = ---------, 2 s (sqrt(2) - 1) s inradius = -, perimeter = 4 s, sagitta = ---------------, side = s] 2 2 and some can be messy: (c7) solve_regular_polygon(area = \a,perimeter = p) 2 2 4 %pi 2 sqrt(16 n A + p ) - tan(---) p 2 n (d7) [name = regular_polygon, n = ---------------------------------, 4 A area = A, circumradius = 2 2 4 %pi 2 2 4 2 A sqrt((sqrt(16 n A + p ) - tan(---) p ) + p ) 2 n ---------------------------------------------------, . . .] 2 2 4 %pi 2 p (sqrt(16 n A + p ) - tan(---) p ) 2 n Even when short, all the dimensions you weren't interested in are messy by definition. The trick is to substitute into what you want instead of letting all the junk print out: (c8) subst(solve_regular_polygon(area = \a,perimeter = p),inradius) 2 A (d8) --- p (c9) subst(solve_regular_polygon(radius = \r,apothem = r), [sides = n,\a/p = area/perimeter,sag = sagitta]) %pi A r (d9) [sides = ---------------------, - = -, sag = R - r] 2 2 p 2 sqrt(R - r ) 2 atan(-------------) R + r Tweak: (c10) block([assume_pos:true],rootscontract(substpart(factor(piece),%,1,2,2,2,1,1,1))) %pi A r (d10) [sides = -------------------, - = -, sag = R - r] R - r p 2 2 atan(sqrt(-----)) R + r --rwg