{VERSION 4 0 "IBM INTEL NT" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 1 12 0 0 255 1 0 2 0 0 1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 20 255 0 0 1 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Ti mes" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 } {PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 128 0 0 1 2 2 2 2 2 2 1 1 1 1 } 1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Title" -1 259 1 {CSTYLE "" -1 -1 "Times" 1 36 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 12 12 3 0 3 0 2 2 19 1 }{PSTYLE "R3 Font 0 " -1 260 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 128 0 128 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "R3 Font 2" -1 261 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 128 128 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 262 1 {CSTYLE "" -1 -1 "T imes" 1 18 255 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 528 "restart: if kernelo pts(platform)=\"unix\" \n then unix:= true; win98:= false; \n date_st ring:= convert(substring(ssystem(\"date \"\"+%a %d/%m/%Y\"\" \")[2], 1 ..-2), symbol)\n else unix:= false; win98:= evalb(ssystem(\"win\")[2][ 1..13]=\"Vous utilisez\"); \n if win98 then tmp:= ssystem(\"date\")[2 ]; searchtext(\":\", tmp); \n tmp:= cat(substring(tmp, 1..%-2), \" \+ \", substring(tmp, %+1..-1));\n date_string:= substring(tmp, 22.. 35);\n else date_string:= ssystem(\"date /t\")[2][1..-2];\n fi: fi: ' unix'=unix, 'win98'=win98, 'date'= date_string;" }}}{EXCHG {PARA 262 " " 0 "" {TEXT -1 56 "sous win98, taper [entr\351e] pour sortir de la fe netre DOS" }}{PAGEBK }{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 14 "Geo_v3(v68-08)" }}}{EXCHG {PARA 258 "" 0 "" {TEXT -1 63 "Copyright (c) 1996-2005 Pierre L. Douillet " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 11 "Licence GPL" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 " " {TEXT -1 283 "libre reproduction pour un usage universitaire sous re serve d'une copie compl\350te,\navec reproduction du programme source \+ dont, en particulier, la pr\351sente mention\n \naucune garantie de fi abilit\351. \nen particulier, toute utilisation dans un contexte indus triel est vivement d\351conseill\351e\n" }}}{EXCHG {PARA 258 "" 0 "" {TEXT -1 0 "" }{TEXT 256 39 "chargement par la commande with(geo_v3)" }}{PARA 258 "" 0 "" {TEXT -1 57 "Retranscription des fichiers du packa ge Geometry de la V3" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 15 "Initiali sations" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "gc( ); kernelopt s(ASSERT=true):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 465 "[libnam e][-1]: racine:= %[1..-4]:\ndo loc:= searchtext(\"\\\\\",racine); if l oc = 0 then break fi;\nracine:= cat(substring(racine,1..loc-1),\"/\", \+ substring(racine,loc+1..-1)); od:\ndo loc:= searchtext(\"\\\\\",racine ); if loc = 0 then break fi;\nracine:= cat(substring(racine,1..loc-1), \"/\", substring(racine,loc+1..-1)); od:\nloc:= searchtext(\"MAPLE\", \+ racine): if loc <> 0 then\nracine:= cat(substring(racine,1..loc-1),\"M aple\", substring(racine,loc+5..-1)); fi: \n'racine'=racine; " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "kernelopts(version): Version := substring(%, 1..searchtext(\",\", %)-1);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 77 "Test if \"pldx\" is preloaded, as required for this lib rary to operate properly" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 206 "try re ad( cat(racine, \"update/check.m\"));\nprint(`The usual 'update' direc tory stil exists, as requiered`);\ncatch: print (` An 'update' reperto ry MUST be created, using 'pldx' package`);;\nend try; print(``);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "Biblioth\350que compl\351mentaire" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "unprotect(savelib); savelib:= proc() error \"savelib \+ is gone\" end :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "ssavelib := NULL:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1063 "xsavelib:= proc() loc al filename, values, library, pathname, f;\nglobal ssavelib, libname; \+ option `Copyright Pld`;\nif assigned(libname) then library := op(1, ev al([libname], 1))\n else error \"the global variable `libname' must be assigned\"\nend if;\nif nargs < 2 then error \"no names specified to \+ save\" end if;\nfilename := args[nargs];\nvalues := args[1 .. nargs - \+ 1] ;\nif not type(filename, '\{string, symbol\}') \n then error \"la st argument (filename) must be a string\" end if;\nif not searchtext( \".m\", filename, -2 .. -1) = 1 \n then error \"last argument (filena me) must be a *.m string\" end if;\n if not type([values], 'list(\{sym bol, string\})') \n then f := remove(type, [values], \{symbol,string \}); \n error \"all arguments must be symbols, cannot save these %1\" , f\n end if;\n pathname := cat(library, \"/\", filename);\n f := su bs('T' = ( (op@map)(convert, [values], symbol), pathname), \n proc( ) save T end proc);\n try f(); ssavelib:= ssavelib, values; return; \+ \n catch: print(lasterror); \n end try;\nerror \"unable to save %1 in %2\", [values], library\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "tzx:=\"\": xsavelib('tzx', `geo_v3.m`); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "ssavelib:= NULL: ever_load:= NULL \+ :" }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 4 "init" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "\"geo_v3 ; author : ; l ast modif (V68) : \"\n || date_string:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 166 "`geo_v3/init`:= \nsubs(message = % , proc( ) option `Copyrigh t Pierre L. Douillet`; \nunprotect(gamma); unprotect('point'):\nprint( convert(message, symbol)) end ) : %();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {SECT 0 {PARA 3 "" 0 "" {TEXT -1 9 "Ever_load" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 246 "`type/point2d`:= proc(p) options `Copyright 199 3 by Waterloo Maple Software`;\n global form,x,y,point;\n if type(p ,table) and \{indices(p)\} = \{[form],[x],[y]\} and p[form] = point\n \+ and not has([p[x],p[y]],\{x,y\}) \nthen true else false fi end ; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 281 "`type/circle2d`:= proc (c) options `Copyright 1993 by Waterloo Maple Software`; \nglobal form ,circle,given,center,radius;;\n if type(c,table) and\n \{[for m],[given],[equation],[center],[radius]\} minus \{indices(c)\} = \{\} \n and c[form] = circle \nthen true else false fi end ;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 332 "`type/line2d`:= proc(l) opt ions `Copyright 1993 by Waterloo Maple Software`;\n global x,y;\n i f type(l,table) and \{indices(l)\} = \{['form'],['given'],['equation'] \} and\n l['form'] = 'line' and type(l['equation'],`=`) and\n \+ type(op(1,l['equation']),linear(\{x,y\})) and op(2,l['equation'] ) = 0 \nthen true else false fi end;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 174 "coord:= proc(X) options `Copyright Pierre L. Douille t, 2001`;\nglobal x,y;\n ASSERT(nargs = 1 and type(X,'point2d'), '` not a point2d`');\n [normal(X[x]),normal(X[y])]\nend;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 382 "detailf:= proc(G) options `Copyrig ht 1993 by Waterloo Maple Software`;\nglobal x,y;\n if type(G,table ) then\n if G['form'] = 'point' then [ G[x], G[y] ]\n \+ elif G['form'] = 'line' then [ G[equation] ]\n elif G['form'] = 'circle' then\n ['center' = [ G['center'][x] , G['center'] [y] ], 'radius' = G['radius'] ]\n fi\n else G\nfi : evalf(%) : end;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 394 "`distance`:= pr oc(u::point2d,v::\{point2d, line2d\}) local cff,dis;\noption `Copyrigh t Pierre L. Douillet, 2001`;\nglobal x,y;\n if type(v,'point2d') th en\n RETURN(sqrt( (u[x]-v[x])^2 + (u[y]-v[y])^2 ))\n else \n cff := op(1,v['equation']);\n dis := abs(subs(\{x = u[x ],y = u[y]\},cff));\n RETURN(dis/sqrt(coeff(collect(cff,x),x)^2 +coeff(collect(cff,y),y)^2) )\n fi\nend;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "ever_load:= ever_load, `type/point2d`,`type/circle 2d`,`type/line2d`, coord, detailf, distance;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 6 "Circle " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3198 "`geo_v3/circle`:= proc (c, u)\nlocal lm, ln1, lp, lq, ld, lf, uu, f, locf, XX, YY;\nglobal fo rm,x,y,given,circle, point, radius, center, diameter_1, diameter, cent er_;\noption `Copyright 1993 by Waterloo Maple Software`;\n if nargs = 2 and type(c, name) and type(u, list) then\n if nops(u) = 3 and type (u[1], table) and type(u[2], table) and u[1][form] = point and u[2][fo rm] = point then\n if type(u[3], table) and u[3][form] = point then \n locf := expand(u[1][x]*(u[2][y] - u[3][y]) - u[1][y]*(u[2][x] - \+ u[3][x]) + u[2][x]*u[3][y] - u[2][y]*u[3][x]);\n if locf = 0 then E RROR(\"the given points do not form a unique circle\") fi;\n c[form ] := circle;\n c[given] := u;\n XX := 1/2*(u[1][x]^2*u[2][y] - u [1][x]^2*u[3][y] + u[1][y]^2*u[2][y] - u[1][y]^2*u[3][y] - u[1][y]*u[2 ][x]^2\n - u[1][y]*u[2][y]^2 + u[1][y]*u[3][x]^2 + u[1][y]*u[3][y ]^2 + u[2][y]^2*u[3][y] - u[2][y]*u[3][x]^2\n - u[2][y]*u[3][y]^2 + u[2][x]^2*u[3][y])/locf;\n YY := - 1/2*(- u[1][x]*(u[2][x]^2 + u [2][y]^2) + u[1][x]*(u[3][x]^2 + u[3][y]^2) + u[1][x]^2*(u[2][x] - u[3 ][x])\n + u[1][y]^2*(u[2][x] - u[3][x]) - u[2][x]*(u[3][x]^2 + u[ 3][y]^2) + u[3][x]*(u[2][x]^2 + u[2][y]^2))/locf;\n c[center] := po int(cat(center_, c), XX, YY);\n c[radius] := sqrt((u[1][x] - XX)^2 \+ + (u[1][y] - YY)^2);\n c['equation'] := x^2 + y^2 + XX^2 + YY^2 - 2 *XX*x - 2*YY*y - %^2 = 0\n elif u[3] = diameter or u[3] = diameter_1 then\n c[form] := circle;\n if u[3] = diameter then c[given] := u fi;\n c[center] := point(cat(center_, c), 1/2*u[1][x] + 1/2*u[2] [x], 1/2*u[1][y] + 1/2*u[2][y]);\n c[radius] := 1/2*sqrt((u[1][x] - u[2][x])^2 + (u[1][y] - u[2][y])^2);\n c['equation'] := x^2 + y^2 \+ - 2*c[center][x]*x - 2*c[center][y]*y - %^2 + c[center][x]^2 + c[cente r][y]^2 = 0\n fi\n elif nops(u) = 2 and type(u[1], table) and u[1][ form] = point and (type(u[2], algebraic) or 0 < u[2]) and\n not type( u[2], table) then\n c[form] := circle;\n c[given] := u;\n c[cent er] := u[1];\n c[radius] := u[2];\n c['equation'] := x^2 + y^2 + u [1][x]^2 + u[1][y]^2 - 2*u[1][x]*x - 2*u[1][y]*y - u[2]^2 = 0\n elif \+ nops(u) = 1 and has(indets(op(u), name), \{x\}) and has(indets(op(u), \+ name), \{y\}) then\n uu := op(u);\n if type(uu, polynom) then f := expand(uu)\n elif type(uu, `=`) then f := expand(op(1, uu) - op(2, \+ uu))\n else ERROR(\"Wrong equation for the circle\")\n fi;\n if \+ type(f, polynom(anything, \{x, y\})) and degree(f, x) = 2 and degree(f , y) = 2 then\n lm := coeff(f, x, 2);\n ln1 := coeff(f, y, 2);\n lp := coeff(f, x, 1);\n lq := coeff(f, y, 1);\n lf := coeff( coeff(f, x, 0), y, 0);\n ld := 1/4*(lp^2 + lq^2)/lm^2 - lf/lm;\n \+ if lm <> ln1 or type(evalf(lm), numeric) and evalf(lm) <= 0 or type(e valf(ld), numeric) and evalf(ld) <= 0 or\n coeff(lp, y) <> 0 then E RROR(\"Wrong equation for the circle\")\n else\n c[form] := cir cle;\n c[given] := u;\n c[center] := point(cat(center_, c), - \+ 1/2*lp/lm, - 1/2*lq/lm);\n c[radius] := sqrt(ld);\n c['equatio n'] := x^2 + y^2 + lp*x/lm + lq*y/lm + lf/lm = 0\n fi\n else ERRO R(\"Wrong equation of the circle\")\n fi\n else ERROR(\"Wrong numbe r or type of arguments\")\n fi\n else ERROR(\"Wrong number or type of arguments\")\n fi;\n RETURN(c)\nend;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "geo_v3[circle]:= `geo_v3/circle` :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "xsavelib(`geo_v3/circle`, \"geo_v3/circle.m\") : " }} }}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Point" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 1358 "unprotect('point'):\n`geo_v3/point`:= proc(X, f, g)\noption `Copyright 1993 by Waterloo Maple Software`;\nglobal form, x,y;\n if nargs = 3 and type(X, name) then\n X[form] := 'point';\n i f type(f, algebraic) and not has(f, \{x, y\}) then X[x] := f\n elif t ype(f, `=`) and op(1, f) = x and not has(op(2, f), \{x, y\}) and type( op(2, f), algebraic) then X[x] := op(2, f)\n else ERROR(\"wrong type \+ of x_coordinate\")\n fi;\n if type(g, algebraic) and not has(g, \{x, y\}) then X[y] := g\n elif type(g, `=`) and op(1, g) = y and not has (op(2, g), \{x, y\}) and type(op(2, g), algebraic) then X[y] := op(2, \+ g)\n else ERROR(\"wrong type of y_coordinate\")\n fi\n elif nargs = \+ 2 and type(X, name) and type(f, list) and nops(f) = 2 then\n X[form] \+ := 'point';\n if not type(f[1], `=`) and type(f[1], algebraic) and no t has(f[1], \{x, y\}) then X[x] := f[1]\n elif type(f[1], `=`) and ty pe(op(2, f[1]), algebraic) and op(1, f[1]) = x and not has(op(2, f[1]) , \{x, y\}) then X[x] := op(2, f[1])\n else ERROR(\"Wrong type of x_c oordinate\")\n fi;\n if not type(f[2], `=`) and type(f[2], algebraic ) and not has(f[2], \{x, y\}) then X[y] := f[2]\n elif type(f[2], `=` ) and type(op(2, f[2]), algebraic) and op(1, f[2]) = y and not has(op( 2, f[2]), \{x, y\}) then X[y] := op(2, f[2])\n else ERROR(\"Wrong typ e of y_coordinate\")\n fi\n else ERROR(\"Wrong number or type of argu ments\")\n fi;\n RETURN(X)\nend;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "geo_v3[point]:= `geo_v3/point` :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "xsavelib(`geo_v3/point`, \"geo_v3/point.m\") : " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 " " {TEXT -1 4 "Line" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1090 "`geo _v3/line`:= proc(l::name, M::list)\nlocal f;\nglobal form,x,y, given; \noption `Copyright 1993 by Waterloo Maple Software`;\n if nops(M) = \+ 2 and type(M[1], table) and type(M[2], table) and M[1][form] = 'point' and M[2][form] = 'point' then\n if normal(M[1][x] - M[2][x]) <> 0 o r normal(M[1][y] - M[2][y]) <> 0 then\n l[form] := 'line'; l[given] := M; l['equation'] := expand((M[1][y] - M[2][y])*x + (M[2][x] - M[1] [x])*y + M[2][y]*M[1][x] - M[1][y]*M[2][x]) = 0\n else print(\"Warni ng: the line is undetermined\"); RETURN(NULL)\n fi\n elif nops(M) = 1 then\n if type(op(M), polynom) then f := op(M) elif type(op(M), ' equation') then f := op(1, op(M)) - op(2, op(M)) else ERROR(\"Wrong eq uation for the line\") fi;\n if has(f, x) and not type(f, linear(x)) or has(f, y) and not type(f, linear(y)) or has(f, \{x, y\}) and not t ype(f, linear(\{x, y\})) or\n not (has(f, x) or has(f, y)) then ERRO R(\"The equation for the line must be linear in x, y\")\n else l[for m] := 'line'; l[given] := M; l['equation'] := f = 0\n fi\n else ERR OR(\"Wrong number or type of arguments\")\n fi; \n RETURN(l)\nend;" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "geo_v3[line]:= `geo_v3/line` :" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "xsavelib(`geo_v3/line`, \"g eo_v3/line.m\") : " }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 8 "Triangle" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1831 "`geo_v3/triangle`:= proc (T, u)\nglobal form,x,y,given,inter;\nlocal u1, u2, u3, uu1, uu2, uu3; \noption `Copyright 1993 by Waterloo Maple Software`;\n if nargs = 2 a nd type(T, name) and type(u, list) and nops(u) = 3 then\n if type(u[1 ], table) and type(u[2], table) and type(u[3], table) then\n if u[1] [form] = 'point' and u[2][form] = 'point' and u[3][form] = 'point' the n\n expand((u[1][x] - u[2][x])*(u[1][y] - u[3][y]) - (u[1][x] - u[3 ][x])*(u[1][y] - u[2][y]));\n if % = 0 then ERROR(\"The triangle ca nnot be determined\") fi;\n T[form] := 'triangle';\n T[given] := u;\n T[1] := u[1];\n T[2] := u[2];\n T[3] := u[3]\n elif u [1][form] = 'line' and u[2][form] = 'line' and u[3][form] = 'line' the n\n procname(T, [inter(u[1], u[2]), inter(u[1], u[3]), inter(u[2], \+ u[3])])\n fi\n elif type(u[1], algebraic) and type(u[2], algebraic) and type(u[3], algebraic) then\n u1 := evalf(u[1]);\n u2 := evalf (u[2]);\n u3 := evalf(u[3]);\n uu3 := u1 + u2 - u3;\n uu2 := u1 \+ - u2 + u3;\n uu1 := -u1 + u2 + u3;\n if type(u1, numeric) and u1 < = 0 or type(u2, numeric) and u2 <= 0 or type(u3, numeric) and u3 <= 0 \+ or type(uu1, numeric) \n and uu1 <= 0 or type(uu2, numeric) and \+ uu2 <= 0 or type(uu3, numeric) and uu3 <= 0 \n then ERROR(\"the gi ven sides are unqualified\")\n fi;\n T[form] := 'triangle';\n T[ given] := u\n elif type(u[1], algebraic) and type(u[2], `=`) and type (u[3], algebraic) and op(1, u[2]) = angle and type(op(2, u[2]), algebr aic) \n then u2 := evalf(op(2, u[2]));\n if type(u2, numeric) and (evalf(Pi, 20) < u2 or u2 < 0) or type(evalf(u[1]), numeric) and u[1] < 0 \n or type(evalf(u[3]), numeric) and u[3] < 0 then ERROR(\" Wrong values of the angle or the sides\")\n fi;\n T[form] := 'tria ngle';\n T[given] := u\n fi\n else ERROR(\"Wrong number or type of \+ arguments\")\n fi;\n RETURN(T)\nend;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "geo_v3[triangle]:= `geo_v3/triangle` :" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "xsavelib(`geo_v3/triangle`, \"geo_v3/triangle.m \") : " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 568 "`geo_v3/cccircle`:= proc(ccc,T)\nglobal \+ form,given,circle;\noptions `Copyright 1993 by Waterloo Maple Software `;\n if nargs = 2 and type(T,table) and T[form] = 'triangle' and\n \+ type(T[given][1],table) and type(ccc,name) then\n T['cir cumcircle'] := circle(ccc,[T[1],T[2],T[3]]); RETURN(%)\n elif\n \+ type(T,table) and T[form] = 'triangle' and not type(T[given][1],ta ble)\n then\n print( \"Warning : To find the circumcirc le, the vertices must be given\");\n RETURN(NULL)\n else ERR OR(\"Wrong number or type of arguments\")\n fi\nend;" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 38 "geo_v3[cccircle]:= `geo_v3/cccircle` :" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "xsavelib(`geo_v3/cccircle`, \+ \"geo_v3/cccircle.m\") : " }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Int er" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4130 "`geo_v3/inter`:= pr oc(noms, u, v, t)\nlocal cffu, cffv, ux, uy, vx, vy, uo, vo, oo1, oo2, oo3, oo4, xyx1, xyx2, xyxy, oo, px, py;\nglobal form,x,y,point,line; \noption `Copyright 1993 by Waterloo Maple Software`;\n if nargs = 3 a nd v = 1 then RETURN(NULL) fi;\n if (nargs = 4 or nargs = 3) and type( u, table) and type(v, table) then\n if u[form] = 'line' and v[form] = 'line' then\n cffu := expand(op(1, u['equation']));\n cffv := exp and(op(1, v['equation']));\n ux := coeff(cffu, x);\n uy := coeff(c ffu, y);\n vx := coeff(cffv, x);\n vy := coeff(cffv, y);\n uo := coeff(coeff(cffu, x, 0), y, 0);\n vo := coeff(coeff(cffv, x, 0), y, 0);\n oo := - vx*uy + ux*vy;\n if oo <> 0 then px := simplify((uy *vo - uo*vy)/oo, assume = real); py := simplify((vx*uo - ux*vo)/oo, as sume = real); RETURN(point(noms, px, py))\n elif simplify(uo/sqrt(ux ^2 + uy^2) - vo/sqrt(vx^2 + vy^2), assume = real) = 0 then print(\"War ning : The lines are the same\"); RETURN(u)\n else print(\"Warning : The lines do not have any intersection\"); RETURN(NULL)\n fi\n eli f u[form] = 'line' and v[form] = 'circle' then\n cffu := expand(op(1 , u['equation']));\n cffv := op(1, v['equation']);\n ux := coeff(c ffu, x);\n uy := coeff(cffu, y);\n uo := coeff(coeff(cffu, x, 0), \+ y, 0);\n vx := coeff(cffv, x);\n vy := coeff(cffv, y);\n vo := c oeff(coeff(cffv, x, 0), y, 0);\n if type(evalf(ux), numeric) and 10^ (-Digits + 3) < abs(evalf(ux)) or ux <> 0 then\n oo1 := uy^2/ux^2 + 1;\n oo2 := 2*uy*uo/ux^2 - vx*uy/ux + vy;\n oo3 := uo^2/ux^2 - \+ vx*uo/ux + vo;\n oo4 := oo2^2 - 4*oo1*oo3;\n if type(evalf(oo4), numeric) then\n if 10^(-Digits + 3) < evalf(oo4) then\n xyx1 := 1/2*(-oo2 + sqrt(oo4))/oo1;\n xyx2 := 1/2*(-oo2 - sqrt(oo4))/ oo1;\n RETURN(point(noms[1], - (uy*xyx1 + uo)/ux, xyx1), point(no ms[2], - (uy*xyx2 + uo)/ux, xyx2))\n elif abs(evalf(oo4, 30)) < .2 900000000*10^(-22) and nargs = 3 then\n xyxy := expand(- 1/2*oo2/ oo1); RETURN(point(noms[1], expand(- (uy*xyxy + uo)/ux), xyxy))\n \+ elif abs(evalf(oo4, 30)) < .2900000000*10^(-22) and nargs = 4 and t = \+ 1 then\n xyxy := expand(- 1/2*oo2/oo1); RETURN(point(noms[1], - ( uy*xyxy + uo)/ux, xyxy), point(noms[2], - (uy*xyxy + uo)/ux, xyxy))\n \+ else print(\"Warning: There is no intersection \"); RETURN(NULL)\n fi\n else\n xyx1 := expand(1/2*(-oo2 + sqrt(oo4))/oo1);\n \+ xyx2 := expand(1/2*(-oo2 - sqrt(oo4))/oo1);\n RETURN(point(nom s[1], expand(- (uy*xyx1 + uo)/ux), xyx1), point(noms[2], expand(- (uy* xyx2 + uo)/ux), xyx2))\n fi\n else\n oo1 := ux^2/uy^2 + 1;\n \+ oo2 := 2*ux*uo/uy^2 - vy*ux/uy + vx;\n oo3 := uo^2/uy^2 - vy*uo/u y + vo;\n oo4 := expand(oo2^2 - 4*oo1*oo3);\n if type(evalf(oo4) , numeric) then\n if 0 < evalf(oo4) then\n xyx1 := expand(1/2 *(-oo2 + sqrt(oo4))/oo1);\n xyx2 := expand(1/2*(-oo2 - sqrt(oo4)) /oo1);\n RETURN(point(noms[1], xyx1, expand(- (ux*xyx1 + uo)/uy)) , point(noms[2], xyx2, expand(- (ux*xyx2 + uo)/uy)))\n elif oo4 = \+ 0 then xyxy := expand(- 1/2*oo2/oo1); RETURN(point(noms[1], xyxy, expa nd(- (ux*xyxy + uo)/uy)))\n else print(\"Warning: There is no inte rsection\"); RETURN(NULL)\n fi\n else\n xyx1 := expand(1/2* (-oo2 + sqrt(oo4))/oo1);\n xyx2 := expand(1/2*(-oo2 - sqrt(oo4))/o o1);\n RETURN(point(noms[1], xyx1, expand(- (ux*xyx1 + uo)/uy)), p oint(noms[2], xyx2, expand(- (ux*xyx2 + uo)/uy)))\n fi\n fi\n el if u[form] = 'circle' and v[form] = 'line' then procname(v, u)\n elif u[form] = 'circle' and v[form] = 'circle' then\n cffu := op(1, u['e quation']);\n cffv := op(1, v['equation']);\n ux := coeff(cffu, x) ;\n uy := coeff(cffu, y);\n uo := coeff(coeff(cffu, x, 0), y, 0); \n vx := coeff(cffv, x);\n vy := coeff(cffv, y);\n vo := coeff(c oeff(cffv, x, 0), y, 0);\n if ux <> vx or uy <> vy \n then procn ame(line(cat('_', u), [(ux - vx)*x + (uy - vy)*y + uo - vo = 0]), v)\n elif uo = vo then print(\"Warning : The circles are the same\"); RE TURN(u)\n else print(\"Warning : There is no intersections between t he circles\"); RETURN(NULL)\n fi\n else ERROR(\"wrong number or typ e of arguments\")\n fi\n else ERROR(\"wrong number or type of argumen ts\")\n fi\nend;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "geo_v3[inter]:= `geo_v3/inter` :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "xsavelib(`geo_v3/inter`, \"geo_v3/i nter.m\") : " }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Infos" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 57 "xsavelib('geo_v3', `geo_v3/init`, e ver_load, `geo_v3.m`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 149 " subs(readlib= _readlib, xreadlib= _readlib, eval(geo_v3)): sort(op(%), proc(a,b) lexorder(lhs(a) , lhs(b)) end): 'elements' = setattribute(% ,column);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "'ever_loaded' \+ = Vector(sort([ever_load]));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 8 "Contr\364le" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "liste:= select(type, [ssavelib], pr ocedure): sort(%);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "map(x mint, liste);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {EXCHG {PARA 258 "" 0 "" {TEXT -1 63 "Copyright (c) 1996-2005 Pierre L . Douillet " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 11 "Licence GPL" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 283 "libre reproduction pour un u sage universitaire sous reserve d'une copie compl\350te,\navec reprodu ction du programme source dont, en particulier, la pr\351sente mention \n \naucune garantie de fiabilit\351. \nen particulier, toute utilisat ion dans un contexte industriel est vivement d\351conseill\351e\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "1;" }}}}{MARK "17" 0 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }