JAMET

370 Reputation

4 Badges

5 years, 167 days

MaplePrimes Activity


These are replies submitted by JAMET

How to change this code  drawLines3.mw  to work with maple 18. Thank you very muche.

Thank you for your answer. Is it possible showing without geom3d ?

With the 3 lines and their projections on the same drawing, the program crashes (maple 18) ; If I try : display(doPlot(a), doPlot(b), doPlot(rhs~(convert(c,list))));I have the information: [La longueur de sortie d←passe la limite de 1%]; How do I manage ? Thank you.

Sorry for my bad explications. I wish the 3 lines a, b, c and their projections on the same ploting. Thank you.

how to make a fold as in descriptive geometry and represent the 3 lines in the 2 planes O,x,z and O,x,-z as well as the ground line; Is it possible ? Thank you very much.

how to avoid confusion between sol1 and 2 in Fig

Fig := proc (k)
local theta, Cor, corde, P, tgP, sol, tgP1, TgP, TgP1;
global a, b, ell, Lieu; theta := k;
corde := a*x/cos(theta)-b*y/sin(theta) = a^2-b^2;
P := [a*cos(theta), b*sin(theta)];
tgP := x*P[1]/a^2+y*P[2]/b^2 = 1;
sol := solve({ell, corde}, {x, y}, explicit);
tgP1 := x*rhs(sol[2][1])/a^2+y*rhs(sol[2][2])/b^2 = 1;#there is confusion between sol[1)and sol[2]
Cor := implicitplot(corde, x = -a .. a, y = -b-5 .. b+5, color = blue);
TgP := implicitplot(tgP, x = -15 .. 15, y = -15 .. 15, color = green);
TgP1 := implicitplot(tgP1, x = -15 .. 15, y = -15 .. 15, color = magenta);
display([Ell, Cor, Lieu, TgP, TgP1], axes = normal, view = [-15 .. 15, -10 .. 10], scaling = constrained) end proc;
Fig(Pi/6):
nframes := 30; 
plots:-display([seq(Fig(2*Pi*i/nframes+0.001), i = 1 .. nframes)], insequence, scaling = constrained)
Thank you for your answer.

nframes := 100; plots:-display([seq(Fig(2*Pi*i/nframes), i = 0 .. nframes)], insequence, scaling = constrained);
There is still an error in the animation, I can't correct.
Error, (in factor/fac1mod/DegreeSet) unable to evaluate sign

 

Sorry your suggestion doen't work restart; _local(D); A := [-L, 0]; B := [L, 0]; C := [x, y]; D := [-x, y]; Dist := proc (X, Y) options operator, arrow; sqrt((X[1]-Y[1])^2+(X[2]-Y[2])^2) end proc; Eq := (Dist(C, D) = Dist(C, B))^2; centre := [solve(diff(Eq, x), x), solve(diff(Eq, y), y)]; with(geometry); `assuming`([conic(p, Eq, [x, y])], [L > 0]); detail(p); asymptotes(p); y_acymp := `~`[solve](`~`[Equation](asymptotes(p)), y); y := solve(Eq, y)[1]; P := proc (X, L0) local Curve, Asymptote, Trapezoid, T, pt, Ip; Curve := plot(eval([y, -y], L = L0), x = -(1/3)*L0 .. 15, color = red, thickness = 3); Asymptote := plot(eval([-sqrt(3)*x-(1/3)*sqrt(3)*L, sqrt(3)*x+(1/3)*sqrt(3)*L], L = L0), x = -(1/3)*L0 .. 15, linestyle = 3, color = black, thickness = 0); Trapezoid := plottools:-polygon(eval([A, B, C, D], [L = L0, x = X]), color = "LightGreen"); Ip := `~`[evalf]((1/3)*(eval(C, [x = X-(1/3)*L0, L = L0]))); printf("%a", Ip); T := plots:-textplot([[(eval(A, [x = X, L = L0]))[], "A"], [(eval(B, [x = X, L = L0]))[], "B"], [(eval(C, [x = X, L = L0]))[], "C"], [(eval(D, [x = X, L = L0]))[], "D"], [Ip[], "I"]], align = {above, left}, font = [TIMES, 16]); pt := plot([A, B, C, Ip], style = plottools:-point, color = blue, symbolsize = 15); plots:-display(Curve, Asymptote, Trapezoid, T, pt, scaling = constrained, size = [400, 800]) end proc; a := 7; P((1/2)*a, 6)

Following your code model, it is curious that get a hyperbol and you a parabola ! Why ?
LieuC := proc () local a, alpha, h, C; alpha := arccos((2*L-a)^2*(1/2)/(a*(2*L-a))); h := (1/2)*tan(alpha)*(2*L-a); C := `~`[eval]([L-L+(1/2)*a, h], L = 6); display([plot([C[1], C[2], a = 4 .. 11]), plot([C[1], -C[2], a = 4 .. 11])], view = [-6 .. 6, -6 .. 10], axes = normal, scaling = constrained) end proc

I apologize  for my bad explination. What are the values of MF1, MF2, coordinates of M with 'a',
'b' and 'phi' without numeric values ? Thank you.

Very good procedure. However what are the values of MF1, MF2, coordinates of M with a, b and phi ? Thank you.

Want to show me a complete example with numeris values. Thank you.

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...

3 4 5 6 7 8 Page 5 of 8