JAMET

365 Reputation

4 Badges

5 years, 117 days

MaplePrimes Activity


These are replies submitted by JAMET

Bravo.Your program meets my expectations.Thank you very much.However, I still want to convert homogeneous coordinates directly into cartesian.

restart;
with(plots):
Choix de 3 points. On veut une famille de coniques passant par ces 3 points; On génère les droites sur le modèle  y=m*(x-x0)+y0
pts:=[[1,3/2],[-1/2,1],[-1,-1]]: #pts in quadrants 1,2,3
tp:=textplot([[pts[1][],"P1"],[pts[2][],"P2"],[pts[3][],"P3"]],'align' = {'above', 'left'}):
#Tp:=textplot(seq([[pts[i][],"P",i=1..3)]],'align' = {'above', 'right'}):
slopes:=[seq(((dx,dy)->dy/dx)((pts[i]-pts[(i mod 3)+1])[]),i=1..3)]:
lines:=zip((pt,slope)->y=slope*(x-pt[1])+pt[2],pts,slopes):
plotpts:=plot(pts,style=point,colour=red,symbol=solidcircle,symbolsize=15):
plotlines:=plot(rhs~(lines),style=line,colour=blue):
display(plotpts,plotlines,tp,view=[-2..2,-2..2]):
On utilse les coordonnées homogènes en x, y, z
lines := zip(proc (pt, slope) options operator, arrow; y-slope*(x-pt[1])+z*pt[2] end proc, pts, slopes):
P := lines[1]: Q := lines[2]: R := lines[3]:
conic1 := expand(subs(z=1-x-y,1*Q*R+1*P*Q+1*P*R)):
CONIC1 := implicitplot(conic1, x = -2 .. 2, y = -2 .. 2, color = red):
display([plotpts, tp,plotlines, CONIC1], scaling = constrained, view = [-2 .. 2, -2 .. 2]):


This is my program, the conic don't pass through the 3 points. Can you improve it ? Thank you.

Thank you for jour help. However you have reversed the problem. I would like to take 3 points and then draw through them a parabola, an ellipse, a parabole as I please...

We know that the equation with homogeneous coordinates in the base (A,B,C) pPQ+qZR+rXY=0, a cartesian equation in the base (A,AB,AC) is pxy+qy(1-x-y)+r(1-x-y)=0 that is written rx²+(q+r-p)xy+qy²-rx-qy=0 The discriminant is of the sign of Delta=(q+r-p)²-4qr. We get a hyperbole, a parabole, an ellipse according to Delta that is negative, null , positive. How to implement this property? Thank you very much for your help.

Is it possible to change coordinates. Example P:=a1x+b1y+c1z ...then f(x,y,z)=aQR+bRP+cPQ=0
to g(x,y)=a'x²+b'xy+c'y²+dx+ey+f=0 ? Thank you.

Your answer is very interesting. How to take into account the coordinates of the 3 points?
How to ensure that the conic will be an hyperbole ..... Thank you.

restart; unprotect(O, D); On considère une ellipse de foyers F et F' dans laquelle la distance focale FF'=2c est égale à la longueur 2b du petit axe ; la longueur du grand axe est 2a; M étant un point quelconque de cette ellipse, calculer les longueurs MF=x et MF=y en fonction de a et le l'angle α. Quelle est la valeur maximum de A ? with(geometry): with(plots): EQ := proc (M, N) RETURN((y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1])) end: Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end: dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end: _EnvHorizontalName := x: _EnvVerticalName := y: O:=[0,0]:M:=[a*cos(alpha),a/sqrt(2)*sin(alpha)]:F:=[a/sqrt(2),0]:Fp:=[-a/sqrt(2),0]: ell := x^2/a^2+2*y^2/a^2 = 1; dist(M, F); MF := subs(cos(alpha) = u, sin(alpha) = v, %); dist(M, Fp); MFp := subs(cos(alpha) = u, sin(alpha) = v, %); eq := MF+MFp = 2*a; simplify(subs(v = sqrt(-u^2+1), %)); allvalues(solve(%, u, explicit)); Warning, solutions may have been lost a := 7; ELL := implicitplot(ell, x = -a .. a, y = -a .. a, color = blue); display([ELL], scaling = constrained); This is the begining of my solution

Here is my worksheet with Explore command that don't work; Thank you for your help.
restart; unprotect(O, D);
On considère un cercle fixe O(R) et un diamètre fixe AB de ce cercle. Un point M décrit la droite D perpendiculaire en C à AB. Les tangentes MP' et MQ' au cercle (O) coupent la tangente Δ en A, respectivement en P et Q. Les droites BP' et BQ' coupant la droite Δ en P'' et Q''.
1°: Montrer que la droite P'Q' passe par un point fixe et que les points P et Q sont respectivelment les milieux des segments AP'' et AQ''.
with(geometry): with(plots):
EQ := proc (M, N) RETURN((y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1])) end:
Vdot := proc (U, V) add(U[i]*V[i], i = 1 .. 2) end:
dist := proc (M, N) sqrt(Vdot(expand(M-N), expand(M-N))) end:
_EnvHorizontalName := x: _EnvVerticalName := y:
O:=[0,0]:R:=7:c:=-2:A:=[-R,0]:B:=[R,0]:C:=[c,0]:M:=[c,My]:

cir := x^2+y^2 = R^2:
tg1 := x*M[1]+y*M[2] = R^2:
sol := solve({cir, tg1}, {x, y}, explicit):
Pp := [subs(sol[1], x), subs(sol[1], y)]: Qp := [subs(sol[2], x), subs(sol[2], y)]:

eqMP := solve(EQ(Pp, M), y): P := [-R, subs(x = -R, eqMP)]:
eqMQ := solve(EQ(Qp, M), y): Q := [-R, subs(x = -R, eqMQ)]:
eqBPp := solve(EQ(B, Pp), y): Ppp := [-R, subs(x = -R, eqBPp)]: 
eqBQp := solve(EQ(B, Qp), y): Qpp := [-R, subs(x = -R, eqBQp)]:
eqPpQp := solve(EQ(Pp, Qp), x): F := [subs(y = 0, %), 0]:#coordonnées de F indépendantes de My
eqPpQp := solve(EQ(Pp, Qp), y):
is(dist(P, A) = dist(P, Ppp));
My := -12;
evalf(dist(P, A)); evalf(dist(P, Ppp));
evalf(dist(Q, A)); evalf(dist(Q, Qpp));
NULL;
simplify(dist(A, Ppp)*dist(A, Qpp));
circle(c1, (x-B[1])^2+(y-B[2])^2 = 4*R^2);
point(P1, P); point(Q1, Q);
line(lPQ, [P1, Q1]);
inversion(cir2, lPQ, c1);
point(O1, O); point(P1, P); point(Q1, Q); point(M1, M);
geometry:-circle(c3, [O1, P1, Q1], [x, y], 'centername' = Op);

line(lMO, [M1, O1]);
sol := solve({Equation(c3), Equation(lMO)}, {x, y}); L := [subs(sol[2], x), subs(sol[2], y)];
dr := draw([c1(linestyle = 3), cir2(color = green, filled = true, transparency = .95), c3(color = green), lMO(color = black), Op], axes = none);
Op := coordinates(Op);
display(dr,plot([O, A, B, C, M, P, Q, Pp, Qp,Ppp,Qpp,F,L], style = point, color = blue, symbolsize = 10), 
implicitplot(cir, x = -10 .. 10, y = -10 .. 10, color = blue), 
plot([c, t, t = -20 .. 8], color = red), 
plot([-R, t, t = -35 .. 8], color = green), 
plot(eqMP, x = -8 .. 3, color = black), 
plot(eqMQ, x = -8 .. 11, color = black), 
plot(eqPpQp,x=-25..10,color=red),
plot(eqBPp,x=-10..10,color=gold),
plot(eqBQp,x=-10..10,color=gold),

textplot([[O[], "O"], [A[], "A"], [B[], "B"], [C[], "C"], [M[], "M"], [P[], "P"], [Q[], "Q"],
[Qp[],"Q'"],[Pp[],"P'"],[Qpp[],"Q''"],[F[],"F"],[L[],"L"],[Op[],"O'"]],
 color = black, 'align' = {'above', 'right'}), 
axes=normal,view=[-25..10,-35..10],scaling = constrained,size=[600,600]):
#printf("%s", msg1);
Fig:=proc(_My) 
local   My,tg1,tg2,sol,eqMP,eqMQ,eqPpQp,M,P,Q,Pp,Qp:
global  O,R,c,A,B,C,F,cir:
My:=_My:
M:=[c,My]: 
tg1:=x*M[1]+y*M[2]=R^(2): 
sol:=solve({cir,tg1},{x,y},explicit): 
Pp:=[subs(sol[1],x),subs(sol[1],y)]:Qp:=[subs(sol[2],x),subs(sol[2],y)]: 
eqMP:=solve(EQ(Pp,M),y):P:=[-R,subs(x=-R,eqMP)]: 
eqMQ:=solve(EQ(Qp,M),y):Q:=[-R,subs(x=-R,eqMQ)]:
eqPpQp := solve(EQ(Pp, Qp), y):
display(plot([O, A,B,C,M,P,Q,F,Pp,Qp], style = point, color = blue, symbolsize = 10),
        implicitplot(cir,x=-10..10,y=-10..10,color=blue),
        plot([c, t, t = -15 .. 15], color = red),  #`droite D`
        plot([-R,t,t=-18..15],color=green), 
        plot(eqMP,x=-10..6,color=black), 
        plot(eqMQ,x=-8..3,color=black),
        plot(eqPpQp,x=-25..10,color=red), 
        textplot([[O[], "O"],[A[],"A"],[B[],"B"],[C[],"C"],[M[],"M"],[P[],"P"],
                 [Pp[],"P'"],[Q[],"Q"],[Qp[],"Q'"],[F[],"F"]], 
        color = black, 'align' = {'above', 'right'}),
        scaling=constrained,size=[500,500]):  
end:


Explore(`if\``(a < -7 or a > 7), Fig(fixed_a*t), t = -15 .. 15);

 In Fig(t) t is the data of point(M,Mx,t) and I want to explore Fig(t) when t in between -15. and -7. then between 7. and 15. Thank you very much.

With numerical values a=8, b=7, I find NF=5.198808560... and (c/a)*MF=5.198808559... the, property is therefore correct. How to demonstrate it? Thank you.

Very interesting demonstration of the first question of a problem given to the baccalaureat given in Clermont (France) with a program of 1945. Thank you.

the points of contact of the ellipse and tangents are not in the middles of the sides.
May i send you my worksheet ?  Thank you.

restart; with(plots): _EnvHorizontalName := 'x';_EnvVerticalName := 'y'; _EnvHorizontalName := x _EnvVerticalName := y EQ := proc (M, N) RETURN((y-M[2])/(x-M[1]) = (N[2]-M[2])/(N[1]-M[1])) end proc: a := 5: b := 7; k := 9; A := [a, 0]; B := [0, b]; b := 7 k := 9 A := [5, 0] B := [0, 7] P := [t, 0]; Q := [0, k/t]; P := [t, 0] [ 9] Q := [0, -] [ t] cir := -a*x-b*y+x^2+y^2 = 0: sol := solve(subs(y = 5, cir), x): cen := [solve(diff(cir, x)), solve(diff(cir, y))]: x0 := sol[1]: y0 := 5: M := [x0, y0]; [5 1 (1/2) ] M := [- + - 65 , 5] [2 2 ] R := sqrt(cen[1]^2+cen[2]^2): beta := arctan(diff(solve(EQ(M, cen), y), x)): eq := t^2*(y0-b)+t*(a*b-a*y0+b*x0-k)-x0*(a*b-k) = 0: sol := solve(eq, t): t := sol[1]: tp := sol[2]: P1 := [t, 0]: Q1 := [0, k/t]: PQ1 := simplify(x*(-a*b+b*t+k)+y*t*(t-a)-t*(-a*b+b*t+k)) = 0: PQ2 := simplify(x*(-a*b+b*tp+k)+y*tp*(tp-a)-tp*(-a*b+b*tp+k)) = 0: P2 := [tp, 0]: Q2 := [0, k/tp]: Fig := proc (alpha) local Dr1, DR1, Dr2, DR2, N, u0, v0, Po, t, tp, sol; global a, b, k, cen, R; u0 := cen[1]+R*cos(alpha); v0 := cen[2]+R*sin(alpha); N := [u0, v0]; sol := solve(t^2*(v0-b)+t*(b*u0-a*v0+a*b-k)-u0*(a*b-k) = 0, t); t := sol[1]; tp := sol[2]; Dr1 := simplify(x*(-a*b+b*t+k)+y*t*(t-a)-t*(-a*b+b*t+k)) = 0; DR1 := implicitplot(Dr1, x = -4 .. 8, y = -4 .. 12, color = brown); Dr2 := simplify(x*(-a*b+b*tp+k)+y*tp*(tp-a)-tp*(-a*b+b*tp+k)) = 0; DR2 := implicitplot(Dr2, x = -4 .. 8, y = -4 .. 12, color = orange); Po := pointplot([N[]], symbol = solidcircle, color = [black], symbolsize = 8); display([Po, DR1, DR2]) end proc: DrPQ1 := implicitplot(PQ1, x = -4 .. 22, y = -4 .. 12, color = blue): DrPQ2 := implicitplot(PQ2, x = -4 .. 22, y = -4 .. 12, color = blue): CIR := implicitplot(cir, x = -4 .. 8, y = -4 .. 12, color = red): Points := pointplot([A[], B[], M[], P1[], P2[], Q1[], Q2[], cen[]], symbol = solidcircle, color = [green], symbolsize = 10): T := plots:-textplot([[A[], "A"], [B[], "B"], [M[], "M"], [P1[], "P1"], [P2[], "P2"], [Q1[], "Q1"], [Q2[], "Q2"], [cen[], "cen"]], font = [times, 10], align = {below, left}): n := 7: display([seq(Fig(2*i*Pi/n), i = 0 .. n), Fig(beta), CIR, DrPQ1, DrPQ2, Points, T], scaling = constrained, size = [500, 500]): display([Fig(beta), CIR, DrPQ1, DrPQ2, Points, T], scaling = constrained, size = [500, 500]); I hope my program will not be transform in pap. I am trying the elements of the ellipse : focus, a, b. Thank you.

Why and how the coordinates of H are given from the outset in the 4th line of 1.mw ?
THank you.

Thank you. I should like to find the affixe with complex only.

3 4 5 6 7 8 Page 5 of 8