JAMET

370 Reputation

4 Badges

5 years, 167 days

MaplePrimes Activity


These are questions asked by JAMET

 A:= <x1,y1,z1>:  B:= <x2,y2,z2>:  P :=<x3, y3, z3>:  H:=A+t*(B-A):  solve( (P-H)^+ . (B-A), t ):  'H'=eval(H, t=`%` );

Error, invalid powe, rhow to overcome this mistake ? Thank you.
Typesetting:-mambiguous( AAssign (x1commay1commaz1)colon  BAssign 

  (x2commay2commaz2)colon  P Assign(x3comma y3comma z3)colon  H

  AssignA + tast(Buminus0A)colon  solveApplyFunction( 

  Typesetting:-mambiguous((Puminus0H)circ + , 

  Typesetting:-merror("invalid power")) period (Buminus0A)comma t

   )colon  (H)equalsevalApplyFunction(Hcomma tequals% )semi)

                                                                                  Théorème de Brianchon
restart; with(plots):unprotect(gamma):
Error, missing operator or `;`
##Si un hexagone est circonscrit à un cercle, les droites qui joignent les sommets opposés passent par un même point.
_EnvHorizontalName := 'x';_EnvVerticalName := 'y';
                    _EnvHorizontalName := x

                     _EnvVerticalName := y

line := proc (x1, y1, x2, y2) options operator, arrow; (x-x1)*(y2-y1)-(y-y1)*(x2-x1) end proc:
R := 3:
ang := [0, (1/3)*Pi, 3*Pi*(1/4)+.2, 7*Pi*(1/6)+.4, 8*Pi*(1/5), 13*Pi*(1/7)]:
for i to 6 do P || i := [R*cos(ang[i]), R*sin(ang[i])] end do:
pts := [seq(P || i, i = 1 .. 6)]:
for i to 6 do tang || i := x*P || i[1]+y*P || i[2] = R^2 end do:
sol:=solve({tang1,tang3},{x,y}):Q13:=[subs(sol,x),subs(sol,y)]:
sol := solve({tang1, tang2}, {x, y}): Q1 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang2, tang3}, {x, y}): Q2 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang3, tang4}, {x, y}): Q3 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang4, tang5}, {x, y}): Q4 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang5, tang6}, {x, y}): Q5 := [subs(sol, x), subs(sol, y)]:
sol := solve({tang1, tang6}, {x, y}): Q6 := [subs(sol, x), subs(sol, y)]:
ptQ := [seq(Q || i, i = 1 .. 6)]:
line14 := line(Q1[1], Q1[2], Q4[1], Q4[2]): L14 := implicitplot(line14, x = -10 .. 10, y = -10 .. 10, color = red):
line25 := line(Q2[1], Q2[2], Q5[1], Q5[2]): L25 := implicitplot(line25, x = -10 .. 10, y = -10 .. 10, color = red):
line36 := line(Q3[1], Q3[2], Q6[1], Q6[2]): L36 := implicitplot(line36, x = -10 .. 10, y = -10 .. 10, color = red):
sol := solve({line14, line25}, {x, y}): I1 := [subs(sol, x), subs(sol, y)]:

lineP23 := line(P2[1], P2[2], P3[1], P3[2]): lineP56 := line(P5[1], P5[2], P6[1], P6[2]):
sol := solve({lineP23, lineP56}, {x, y}): gamma := [subs(sol, x), subs(sol, y)]:
Error, attempting to assign to `gamma` which is protected.  Try declaring `local gamma`; see ?protect for details.
lineP12 := line(P1[1], P1[2], P2[1], P2[2]): lineP45 := line(P4[1], P4[2], P5[1], P5[2]):
sol := solve({lineP12, lineP45}, {x, y}): beta := [subs(sol, x), subs(sol, y)]:
lineP34 := line(P3[1], P3[2], P4[1], P4[2]): lineP16 := line(P1[1], P1[2], P6[1], P6[2]):
sol := solve({lineP16, lineP34}, {x, y}): alpha := [subs(sol, x), subs(sol, y)]:
pl:= line(alpha[1], alpha[2], gamma[1], gamma[2]):
hexa := seq(implicitplot(tang||i, x = -20 .. 20, y = -20 .. 20, linestyle=3,color = blue),i=1..6);
hexa:=plot([seq([P||i,P||(i mod 6)+1],i=1..6),color=green); 
hexa:=plot([seq([P||i,P||(i+1)],i=1..6)],thickness=4,color=green); 
hex:=plot([[Q1,Q2],[Q2,Q3],[Q3,Q4],[Q4,Q5],[Q5,Q6],[Q6,Q1]],thickness=4,color=green);
tp := textplot({seq([op(pts[i]), cat("P", i)], i = 1 .. 6)}, 'align' = {'above', 'left'});
tpq := textplot({seq([op(ptQ[i]), cat("Q", i)], i = 1 .. 6)}, 'align' = {'above', 'left'});
TP:=textplot([[I1[],"I"],[alpha[],"alpha"],[beta[],"beta"],[gamma[],"gamma"]],'align' = {'above', 'left'});
slopes:=[seq(((dx,dy)->dy/dx)((pts[i]-pts[(i mod 6)+1])[]),i=1..6)];
lines:=zip((pt,slope)->y=slope*(x-pt[1])+pt[2],pts,slopes);
plotpts:=plot(pts,style=point,colour=red,symbol=solidcircle,symbolsize=5);
plotptQ:=plot(ptQ,style=point,colour=black,symbol=solidcircle,symbolsize=5);
plotlines:=plot(rhs~(lines),style=line,linestyle=3,colour=magenta);
cir:=implicitplot(x^2+y^2=R^2,x=-R..R,y=-R..R,color=black);
PL:=implicitplot(pl,x=-1..15,y=-15..6,color=blue,thickness=3);

 hexa := implicitplot(tang1, x = -20 .. 20, y = -20 .. 20, 

   linestyle = 3, color = blue), implicitplot(tang2, 

   x = -20 .. 20, y = -20 .. 20, linestyle = 3, color = blue), 

   implicitplot(tang3, x = -20 .. 20, y = -20 .. 20, 

   linestyle = 3, color = blue), implicitplot(tang4, 

   x = -20 .. 20, y = -20 .. 20, linestyle = 3, color = blue), 

   implicitplot(tang5, x = -20 .. 20, y = -20 .. 20, 

   linestyle = 3, color = blue), implicitplot(tang6, 

   x = -20 .. 20, y = -20 .. 20, linestyle = 3, color = blue)


Error, `)` unexpected
display(plotpts,plotptQ,plotlines,hex,cir,L14,L25,L36,PL,tp,tpq,TP,axis = [gridlines = [4, color = blue]],
view=[-6..10,-15..6],scaling=constrained,axes=none,size=[800,800]);
display(plotpts, plotptQ, plotlines, hex, cir, 

  implicitplot(0, x = -10 .. 10, y = -10 .. 10, color = red), 

  implicitplot(0, x = -10 .. 10, y = -10 .. 10, color = red), 

  implicitplot(0, x = -10 .. 10, y = -10 .. 10, color = red), PL, 

  tp, tpq, TP, axis = [gridlines = [4, color = blue]], 

  view = [-6 .. 10, -15 .. 6], scaling = constrained, 

  axes = none, size = [800, 800])


NULL;
I don’t know how to correct those mistakes. Thank you to help me.

restart
EQ := proc(M, N) RETURN((y - M[2])/(x - M[1]) = (N[2] - M[2])/(N[1] - M[1])); end proc:
 with(plots):   
 with(geometry):   
_EnvHorizontalName := 'x':   _
EnvVerticalName := 'y':  
a := 7;  b := 5;  
c:=sqrt(a^2-b^2); 
 t:= (3* Pi)/(4):    
ellipse(el,x^2/a^2 + y^2/b^2 - 1 ): 
 point(M1, a*cos(t),b*sin(t)):  
point(F1,-c,0):point(F2,c,0):    
line( L1,[F1,M4]): 
point(M1, a*cos(t),b*sin(t)):  
EQ([a*cos(t),b*sin(t)],[-c,0]);  
solve(`%`,y);m:=coeff(`%`,x);   
line(L3,y=m*(x-c)); 
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[1]:xM2:=rhs(`%`):  
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[2]:yM2:=rhs(`%`):  
point(M2,xM2,yM2); 
line( tang1,x*xM2/a^2 + y*yM2/b^2 = 1);  
intersection(C1,L1,tang1);  
line(L4,[F1,M2]);  C1:=[ HorizontalCoord(C1), VerticalCoord(C1)]; 
 F1:=[-c,0];M2:= [ HorizontalCoord(M2), VerticalCoord(M2)];    
display( [ textplot( [[ -c, 0, "F1"],[ c,0, "F2"] ,                         
[ HorizontalCoord(M1), VerticalCoord(M1), "M1"],                          
[ HorizontalCoord(M2), VerticalCoord(M2), "M2"],                         
[ HorizontalCoord(C1), VerticalCoord(C1), "C1"] ],'align'={"above",'right'},                       [polygonplot([C1,F1,M2], color=blue,filled=true,transparency=0.9)]);     
draw( [ el(color=red),M1(color=black,symbol=solidcircle, symbolsize=16),
                      M2(color=black,symbol=solidcircle, symbolsize=16),                      
                      L1( color=black),L3(color=green),L4(color=green),                      
                      tang1(color=red), 
                      F1(color=blue, symbol=solidcircle, symbolsize=16),                      
                      F2(color=red, symbol=solidcircle, symbolsize=16),
                      C1(color=black, symbol=solidcircle, symbolsize=16),                     ],                                    axes=none ) ] );
Error, missing operator or `;` Many errors Icant corrected.  Thank you.

Problema with textplot

restart:with(plots):
  with(geometry):
  _EnvHorizontalName := 'x':
  _EnvVerticalName := 'y':
  a := 7:
  b := 3:
  ellipse(p, x^2/a^2 + y^2/b^2 - 1, [x, y]):
  Fig := proc(t)
              local M, l1,L1,L2,  q, m, c , tex;
              global a, b, p;
              point(M, a*cos(t), b*sin(t));
              if   VerticalCoord(M)=0
              then line(l1, x=HorizontalCoord(M));
              else m:=eval[recurse]( rhs
                                     ( isolate
                                       ( diff
                                         ( eval
                                           ( Equation(p),
                                             y=y(x)
                                           ),
                                           x
                                         ),
                                         diff(y(x),x)
                                       )
                                     ),
                                     [ y(x)=y,
                                       x=HorizontalCoord(M),
                                       y=VerticalCoord(M)
                                     ]
                                   );
                   c:=VerticalCoord(M)-m*HorizontalCoord(M);
                   line(l1, y=m*x+c);
              fi;
              reflection(q, p, l1);
              line(L1, [point(P1, evalf~(coordinates(foci(q)[1]))),
                            point(P2, evalf~(coordinates(foci(q)[2])))]):  
              line(L2, [point(P3, evalf~(coordinates(foci(p)[1]))),
                            point(P4, evalf~(coordinates(foci(p)[2])))]): 
              segment(P1P3,[P1,P3]): circle(cir1,[P3,2*a]):
              segment(P2P4,[P2,P4]): 
              circle(cir1,[P3,2*a]): circle(cir2,[P4,2*a]):
              textplot([[P2[], "F1"], [P4[], "F2"]], font = [times, 10], align = {below, left}):            
              draw( [ p(color = blue),P1P3(color=magenta,linestyle=3),
                      q(color = blue),P2P4(color=magenta,linestyle=3),
                      l1(color = black),L1(color = black),cir1(color=magenta,linestyle=3),
                      cir2(color=magenta,linestyle=3),
                      M(color = blue, symbol = solidcircle, symbolsize = 16),
                      P1(color = red, symbol = solidcircle, symbolsize = 16),
                      P2(color = red, symbol = solidcircle, symbolsize = 16),
                      P3(color = red, symbol = solidcircle, symbolsize = 16),
                      P4(color = red, symbol = solidcircle, symbolsize = 16)
                    ],
                    axes = none,
                    scaling = constrained);
          end proc:
#
# Change nFig to type float
#
   nFig := 180.0:
#
# Make sure loop index is a float, and change end point
# on loop to nFig-1.0
#
   Figs := seq(Fig(2*Pi*i/nFig), i = 0.0 .. nFig-1.0):
   plots:-display(Figs, insequence = true);
Error, (in plots:-textplot) improper op or subscript selector
Error, (in plots:-display) expecting plot structure but received: Figs

_local(D);
f := (x, y) -> 3*x^2 - 3*y*x + 6*y^2 - 6*x + 7*y - 9;
coeffs(f(x, y));
A, B, C, D, E, F := %;
theta := 1/2*arctan(B/(A - C));
solve({-2*A*xc - B*yc = D, -B*xc - 2*C*yc = E});
assign(%);
x := xcan*cos(theta) - ycan*sin(theta) + xc;
y := xcan*sin(theta) + ycan*cos(theta) + yc;
Eq := simplify(expand(f(x, y)));
xcan^2/simplify(sqrt(-tcoeff(Eq)/coeff(Eq, xcan^2)))^`2` + ycan^2/simplify(sqrt(-tcoeff(Eq)/coeff(Eq, ycan^2)))^`2` = 1;
a := sqrt(-tcoeff(Eq)/coeff(Eq, xcan^2));
b := sqrt(-tcoeff(Eq)/coeff(Eq, ycan^2));
c := sqrt(a^2 - b^2);
F1 := [xc + c*cos(theta), yc + c*sin(theta)];
evalf(%);
F1 := [xc - c*cos(theta), yc - c*sin(theta)];
evalf(%);
Points := pointplot([F1[], F2[]], symbol = solidcircle, color = [red], symbolsize = 6);
xcan := plot(yc + tan(theta)*('x' - xc), 'x' = -2 .. 3.5, color = black);
ycan := plot(yc - ('x' - xc)/tan(theta), 'x' = 0.1 .. 1.5, color = black);
Ellipse := plots[implicitplot](f('x', 'y'), 'x' = -2 .. 3.5, 'y' = -2 .. 1.5, color = red, thickness = 2, gridrefine = 5);
labels := plots[textplot]([[0.4, 1.3, "ycan"], [3.2, 0.75, "xcan"]], font = [TIMES, ROMAN, 14]);
plots[display](xcan, ycan, Points, Ellipse, labels, scaling = constrained);

I do not why I get this message:

Error, (in plots:-display) expecting plot structure but received: pointplot([17/21-(2/21)*(1407/(-(3/2)*2^(1/2)+9/2)-1407/((3/2)*2^(1/2)+9/2))^(1/2)*cos((1/8)*Pi), -8/21-(2/21)*(1407/(-(3/2)*2^(1/2)+9/2)-1407/((3/2)*2^(1/2)+9/2))^(1/2)*sin((1/8)*Pi), F2[]], symbol = solidcircle, color = [red], symbolsize = 6) NULL;

Thank you for your help.
 

1 2 3 4 5 6 7 Last Page 2 of 23