Quantcast
Viewing all articles
Browse latest Browse all 24

coodinates of the foot of a perpendicularline

restart; interface(rtablesize = 10): _EnvHorizontalName := 'x': _EnvVerticalName := 'y': eqPA := (y-b0)/(x-a0) = k: solPA := y=solve(eqPA, y): #k coefficient directeur de PA eqPB := (y-b0)/(x-a0) = -1/k: solPB :=y= solve(eqPB, y):#PB perpendicalaire à PA xA := solve(subs(y = 0, eqPA), x): yB := solve(subs(x = 0, eqPB), y): eqAB := x/xA+y/yB = 1; x k y k eqAB := --------- + --------- = 1 a0 k - b0 b0 k + a0 t := solve(a*(xM+(1/2)*t*a)+b*(yM+(1/2)*t*b)+c = 0, t); 2 (a xM + b yM + c) t := - ------------------- 2 2 a + b #Recherche des coordonnées de la projection d'un point sur une droite D #M(x,y)un point quelconque du plan, M'(x',y') son symé trique dans la symétrie orthogonale d'axe D #le vecteur MM' est colinéaire du vecteur normal n de D; vec(MM')=t.vec(n), n= #relation vectorielle x'-x=ta, y-y'=tb, coordonnées du milieu de MM': x+ta/2 et y+tb/2 #ce milieu appartient à D donc a(x+ta/2)+b(y+tb/2)+c=0 d'où t=-2(ax+by+c):(x²+y²) d'où la procédure : ProjPoint := proc (expr, P)#expr equation de droite D, ax+by-1=0 et P point de coordonnées [a0,b0] local a, b, c, xM, yM, t; a := coeff(expr, x); b := coeff(expr, y); c :=tcoeff(expr):#-1; t := -(2*a*P[1]+2*b*P[2]+2*c)/(a^2+b^2); xM := simplify(P[1]+(1/2)*t*a); yM := simplify(P[2]+(1/2)*t*b); return [xM,yM] end: NULL; ProjPoint(x*k/(a0*k-b0)+y*k/(b0*k+a0)-1, [a0, b0]); Error, (in ProjPoint) invalid argument for sign, lcoeff or tcoeff simplify(%[1]/a0+%[2]/b0-1); Problem with tcoeff.

Viewing all articles
Browse latest Browse all 24

Trending Articles