JAMET

370 Reputation

4 Badges

5 years, 171 days

MaplePrimes Activity


These are replies submitted by JAMET

@tomleslie  Very good prg using geomety, Thang you very much;

@sand15 
Yes, weights may be negative

Tomlesie, I thank you yout program is very good.
I want now to draw equilateral hyperbole
  orthocenter(H, Tr1):
   evalf(coordinates(H));
   #conic(Hyp,[P1,P2,P3,P4,H],[x,y]);
But the computer crashes
Perhaps we should model the equation of this hyperbole?

Very good prg
line(L1,[P1,P3]):
line(L2,[P1,P4]):
ntersection(G,L1,L2);#gravity center of P1P2P3P4
G1:=convert(coordinates(G),Vector);
G:=<<-(5*sqrt(2))/2>|<(5*sqrt(2))/2>>;
pointplot(G,color = blue, symbol = diamond)
E - Euler center of P1,P2,P3,P4
I don(t know how yo place these points. 

 #p1 := polygonplot([P1,P2,P3,P4], color = blue, filled=true,transparency = 0.7):
   #p2 := polygonplot([o1,o2,o3,o4], color = red, filled=true,transparency = 0.8):
   display
   ( [ draw
       ( [ seq
           ( [ `||`(P, j)(color = black, symbol = solidcircle, symbolsize = 12),
               `||`(o, j)(color = black, symbol = solidcircle, symbolsize = 12),
               `||`(Tr, j)(color = green),
               `||`(Elc, j),
               `||`(seg, j)(color=black,filled=true)

             ][],
             j=1..4
           ),
           cir(color = blue)#p1,p2
When i take off #, I got massage of error with polygonplot. How to correct. Thank you.

I am sorry. I got still these messages
 

triangle: 0 < -P1+P2+P4
Error, (in geometry:-triangle) not enough information: the triangle is not defined
Error, (in geometry:-EulerCircle) wrong type of argument, expecting a triangle
triangle: 0 < -P1+P2+P3
Error, (in geometry:-triangle) not enough information: the triangle is not defined
Error, (in geometry:-EulerCircle) wrong type of argument, expecting a triangle
triangle: 0 < -P3+P2+P4
Error, (in geometry:-triangle) not enough information: the triangle is not defined
Error, (in geometry:-EulerCircle) wrong type of argument, expecting a triangle
triangle: 0 < -P1+P3+P4
Error, (in geometry:-triangle) not enough information: the triangle is not defined
Error, (in geometry:-EulerCircle) wrong type of argument, expecting a triangle
                              cir

                   ngon1 := [P1, P2, P3, P4]

Error, (in geometry:-coordinates) wrong type of argument
                   ngon2 := [P1, P2, P3, P4]

Error, (in geometry:-coordinates) wrong type of argument
Error, (in geometry:-coordinates) wrong type of argument
 

Sorry I need still your help. Could we still better use the computer to condense the reports ( 1,2,3,4) ?
 

  restart:
  with(geometry):
  with(plots):
  _EnvHorizontalName = 'x':
  _EnvVerticalName = 'y':
   R := 5:
   ang := [3/4*Pi, -(3*Pi)/4, -Pi/6,4*Pi/9]:
   seq
   ( point
     ( `||`(P, i),
       [ R*cos(ang[i]), R*sin(ang[i])]
     ),
     i = 1 .. 4
   ):
   seq
   ( dsegment
     ( `||`(seg, i),
       [ `||`(P, i),
         `||`(P, irem(i, 4) + 1)
       ]
     ),
     i = 1 .. 4
   ):
   triangle(Tr1,[P1,P2,P4]):
   EulerCircle(Elc1,Tr1,'centername'=o1):
   triangle(Tr2,[P1,P2,P3]):
   EulerCircle(Elc2,Tr2,'centername'=o2):
   triangle(Tr3,[P3,P2,P4]):
   EulerCircle(Elc3,Tr3,'centername'=o3):
   triangle(Tr4,[P1,P3,P4]):
   EulerCircle(Elc4,Tr4,'centername'=o4):
   circle(cir, [point(OO, [0, 0]), R]):
   ngon1 :=[P1,P2,P3,P4]:
   poly1:=polygonplot(ngon1,color=blue,filled=true):
   ngon2 :=[P1,P2,P3,P4]:
   poly2:=polygonplot(ngon2,color=yellow,filled=true):
   display
   ( [ draw
       ( [ P1(color = black, symbol = solidcircle, symbolsize = 12),
           P2(color = black, symbol = solidcircle, symbolsize = 12),
           P3(color = black, symbol = solidcircle, symbolsize = 12),
           P4(color = black, symbol = solidcircle, symbolsize = 12),
           o1(color = black, symbol = solidcircle, symbolsize = 12),
           o2(color = black, symbol = solidcircle, symbolsize = 12),
           o3(color = black, symbol = solidcircle, symbolsize = 12),
           o4(color = black, symbol = solidcircle, symbolsize = 12),
           seg1,
           seg2,
           seg3,
           seg4,
           Tr1(color=green),Tr2(color=green),Tr3(color=green),Tr4(color=green),
           Elc1,Elc2,Elc3,Elc4,
           cir(color = blue)
         ]
       ),
       textplot
       ( [ seq
           ( [ coordinates(`||`(P, i))[],
               convert(`||`(P, i), string)
             ],
             i=1..4
           )
         ],
         [ seq
           ( [ coordinates(`||`(o, i))[],
               convert(`||`(o, i), string)
             ],
             i=1..4
           )
         ],
            
         align=[above, right]
       )
     ],
     axes=none
   );


Error, (in plots:-polygonplot) incorrect arguments for creating polygons structure
Error, (in plots:-polygonplot) incorrect arguments for creating polygons structure
Error, (in plots:-textplot) unexpected option: [[(1/2)*((125/4)*2^(1/2)+((5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))^2*(-(5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))-((5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))*(-(5/4)*2^(1/2)+(5/2)*cos((4/9)*Pi))^2-((5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))*(-(5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))^2+(-(5/4)*2^(1/2)+(5/2)*cos((4/9)*Pi))^2*(-(5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi)))/(-25/4-(25/4)*2^(1/2)*cos((4/9)*Pi)), -(1/2)*((5/2)*2^(1/2)*((-(5/4)*2^(1/2)+(5/2)*cos((4/9)*Pi))^2+((5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))^2)-(5/2)*2^(1/2)*((-(5/4)*2^(1/2)+(5/2)*cos((4/9)*Pi))^2+(-(5/4)*2^(1/2)+(5/2)*sin((4/9)*Pi))^2)-(-(5/4)*2^(1/2) ... 2^(1/2)*sin((4/9)*Pi)+(25/16)*2^(1/2)*3^(1/2)-(25/16)*2^(1/2)), "o4"]]

Thank you very much for your help.
 

solve({x = 1 + 5*t, y = 1 + 3*t, 5*x + 3*y + 1 = 0}, {t, x, y});
Warning, solving for expressions other than names or functions is not recommended.
Thank you.

Thank you very much. How to leave fixed the circumscribed triangle P1P2P2 and make mobile the triangle inscribed AM2 M3 ? Then add the letters on figure M1, M2, A. Note that the M1M2 segment remains tangent to the inscribed circle.

ProjPL:=proc(P,A,B)
local H,x1,x2,x33,y1,y2,y3,t:
A:= <x1,y1>;
B:= <x2,y2>;
P :=<x3, y3>; 
H:=A+t*(B-A); solve( (P-H)^+ . (B-A), t );
'H':=eval(H, t=`%` );
end:
Error, (in ProjPL) invalid left hand side of assignment/ How to correct this error ? . Thank you.
 

our program ll2 works very well; Thank a lot. How to find the equation of the geometrical place of T when the points M1 and M2 turn 

Fig:=proc(t)  global a,b,c,F1,F2,el:  local  L4,M1,M2,t1,t2,tang1,tang2,T:  t1:=t:  t2:=t+1/(2)*Pi:   point(M1, a*cos(t1), b*sin(t1)):    point(M2, a*cos(t2), b*sin(t2)):    line( tang1, x*a*cos(t1)/a^2 + y*b*sin(t1)/b^2 = 1):    line( tang2, x*a*cos(t2)/a^2 + y*b*sin(t2)/b^2 = 1):    intersection(T,tang1,tang2):  line(L4, [F2, M1]):  circle( c1, [T, distance(T, L4) ] ):    display( [ textplot               ( [ [ -c, 0, "F1"],                   [ c,  0, "F2"] ,                                            [ coordinates(M1)[], "M1"],                                             [ coordinates(M2)[], "M2"],                   [ coordinates(T)[], "T"]                 ],                 align={"above",'right'}               ),               draw               ( [ c1(color=blue),                   el(color=red),                   M1(color=black, symbol=solidcircle, symbolsize=16),                   M2(color=black, symbol=solidcircle, symbolsize=16),                   T(color=black, symbol=solidcircle, symbolsize=16),                                                 L4(color=green),                   tang1(color=blue),                   tang2(color=blue),                   F1(color=blue, symbol=solidcircle, symbolsize=16),                                       F2(color=red, symbol=solidcircle, symbolsize=16)                 ]              )            ],            scaling=constrained,            axes=none         )  end:  #` for instance `  Fig:=proc(t)  global a,b,c,F1,F2,el:  local  L4,M1,M2,t1,t2,tang1,tang2,T:  t1:=t:  t2:=t+1/(2)*Pi:   point(M1, a*cos(t1), b*sin(t1)):    point(M2, a*cos(t2), b*sin(t2)):    line( tang1, x*a*cos(t1)/a^2 + y*b*sin(t1)/b^2 = 1):    line( tang2, x*a*cos(t2)/a^2 + y*b*sin(t2)/b^2 = 1):    intersection(T,tang1,tang2):  line(L4, [F2, M1]):  circle( c1, [T, distance(T, L4) ] ):    display( [ textplot               ( [ [ -c, 0, "F1"],                   [ c,  0, "F2"] ,                                            [ coordinates(M1)[], "M1"],                                             [ coordinates(M2)[], "M2"],                   [ coordinates(T)[], "T"]                 ],                 align={"above",'right'}               ),               draw               ( [ c1(color=blue),                   el(color=red),                   M1(color=black, symbol=solidcircle, symbolsize=16),                   M2(color=black, symbol=solidcircle, symbolsize=16),                   T(color=black, symbol=solidcircle, symbolsize=16),                                                 L4(color=green),                   tang1(color=blue),                   tang2(color=blue),                   F1(color=blue, symbol=solidcircle, symbolsize=16),                                       F2(color=red, symbol=solidcircle, symbolsize=16)                 ]              )            ],            scaling=constrained,            axes=none         )    ;end:
debug(Fig);
                              Fig

Fig(Pi/4);
{--> enter Fig, args = (1/4)*Pi
                                 1   
                           t1 := - Pi
                                 4   

                                 3   
                           t2 := - Pi
                                 4   

                               M1

                               M2

                             tang1

                             tang2

                               T

                               L4

                               c1

<-- ERROR in Fig (now at top level) = expecting plot structures but received: %1, [plots:-textplot*([[-2*10^(1/2), 0, F1], [2*10^(1/2), 0, F2], [(11/2)*2^(1/2), (9/2)*2^(1/2), M1], [-(11/2)*2^(1/2), (9/2)*2^(1/2), M2], [0, 9*2^(1/2), T]], align = {above, right}), geometry:-draw*[c1(color = blue), el(color = red), M1(color = black, symbol = solidcircle, symbolsize = 16), M2(color = black, symbol = solidcircle, symbolsize = 16), T(color = black, symbol = solidcircle, symbolsize = 16), L4(color = green), tang1(color = blue), tang2(color = blue), F1(color = blue, symbol = solidcircle, symbolsize = 16), F2(color = red, symbol = solidcircle, symbolsize = 16)]]}
Error, (in plots:-display) expecting plot structures but received: [plots:-textplot*([[-2*10^(1/2), 0, "F1"], [2*10^(1/2), 0, "F2"], [(11/2)*2^(1/2), (9/2)*2^(1/2), "M1"], [-(11/2)*2^(1/2), (9/2)*2^(1/2), "M2"], [0, 9*2^(1/2), "T"]], align = {"above", right}), geometry:-draw*[c1(color = blue), el(color = red), M1(color = black, symbol = solidcircle, symbolsize = 16), M2(color = black, symbol = solidcircle, symbolsize = 16), T(color = black, symbol = solidcircle, symbolsize = 16), L4(color = green), tang1(color = blue), tang2(color = blue), F1(color = blue, symbol = solidcircle, symbolsize = 16), F2(color = red, symbol = solidcircle, symbolsize = 16)]]
nFig := 60.0;
Figs := seq(Fig1(2*Pi*i/nFig), i = 10 .. nFig - 1.0);
display(Figs, insequence = true);
                          nFig := 60.0

#Corona--45-p9
#Les 4 rayons-vecteurs qui joignent les foyers d'une ellipse à 2 pointsM, M' de la courbe sont tangents à même cercle
restart;
with(plots):
with(geometry):
_EnvHorizontalName := 'x':
_EnvVerticalName := 'y':


a := 11;
b := 9:
c := sqrt(a^2 - b^2);
t1 := (3*Pi)/4;
t2 := (-4*Pi)/5;
ellipse(el, x^2/a^2 + y^2/b^2 - 1);
point(M1, a*cos(t1), b*sin(t1)):
point(M2, a*cos(t2), b*sin(t2)):
point(F1, -c, 0);
point(F2, c, 0);
line(L1, [F1, M1]):
line(L2, [F2, M2]):
line(L3, [F1, M2]):
line(L4, [F2, M1]):
line( tang1,x*a*cos(t1)/a^2 + y*b*sin(t1)/b^2 = 1):
line( tang2,x*a*cos(t2)/a^2 + y*b*sin(t2)/b^2 = 1): 
intersection(T,tang1,tang2):

distance(T, L4):r:=evalf(%):

                            a := 11

                                  (1/2)
                         c := 2 10     

                                 3   
                           t1 := - Pi
                                 4   

                                  4   
                          t2 := - - Pi
                                  5   

                               el

                               F1

                               F2

with(plottools):

c1 := circle(coordinates(T), r, color = blue):
display((c1),
  ( [ textplot
      ( [ [ -c, 0, "F1"],
          [ c,  0, "F2"] ,                         
          [ coordinates(M1)[], "M1"],                          
          [ coordinates(M2)[], "M2"],
          [ coordinates(T)[], "T"]                           
          
        ],
        align={"above",'right'}
      ),
      draw
      ( [ el(color=red),
          M1(color=black,symbol=solidcircle, symbolsize=16),
          M2(color=black,symbol=solidcircle, symbolsize=16),
          T(color=black,symbol=solidcircle, symbolsize=16),            
          L1( color=black),
          L2(color=green),
          L3( color=black),
          L4(color=green),
          tang1(color=blue), 
          tang2(color=blue),
          F1(color=blue, symbol=solidcircle, symbolsize=16),                      
          F2(color=red, symbol=solidcircle, symbolsize=16)
          
        ],
        axes=none
      )
    ]
  );

Error, `;` unexpected 
it is very difficult to find this error; Thank you for your help.

 Fig := proc(t)
              local M1,M2,m,L1,L3,L4,tang1,tang2,C1,P,T1,xM2,yM2;
              global a, b, c,el,F1,F2,OO,cir;
              point(M1, a*cos(t), b*sin(t)); 
              line( L1, [F1, M1]): 
              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):  
              line( tang2,x*cos(t)/a + y*sin(t)/b = 1): 
              intersection(C1,L1,tang1): 
              midpoint(P,M2,C1): 
             #intersection(P,tang1,tang2): 
              line(L4,[F1,M2]):
              triangle(T1, [C1,F1,M2]): 
 display
  ( [ textplot
      ( [ [ -c, 0, "F1"],
          [ c,  0, "F2"] ,
          [ coordinates(P)[], "P"],                          
          [ coordinates(M1)[], "M1"],                          
          [ coordinates(M2)[], "M2"],                         
          [ coordinates(C1)[], "C1"]
        ],
        align={"above",'right'}
      ),
      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),  tang2(color=red),cir(color=black),
          P(color=blue, symbol=solidcircle, symbolsize=16),   
          F1(color=blue, symbol=solidcircle, symbolsize=16),                      
          F2(color=red, symbol=solidcircle, symbolsize=16),
          C1(color=black, symbol=solidcircle, symbolsize=16),
          T1(color=blue, filled=true, transparency=0.95)
        ],
        axes=none
      )
    ]
  );
end:
      
  
 nFig := 180.0:

   Figs := seq(Fig(2*Pi*i/nFig), i = 0 .. nFig-1.0):
   display(Figs, insequence = true);
I eliminated an intersection but there is still a problem with P, How to solve it. Thank you.

 Fig := proc(t)
              local M1,M2,m,L1,L3,L4,tang1,tang2,C1,P,T1,xM2,yM2;
              global a, b, c,el,F1,F2,OO,cir;
              point(M1, a*cos(t), b*sin(t)); 
              line( L1, [F1, M1]): 
              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):  
              line( tang2,x*cos(t)/a + y*sin(t)/b = 1): 
              intersection(C1,L1,tang1): 
              intersection(P,tang1,tang2): line(L4,[F1,M2]):
              triangle(T1, [C1,F1,M2]): 
      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),  tang2(color=red),cir(color=black),
          P(color=blue, symbol=solidcircle, symbolsize=16),   
          F1(color=blue, symbol=solidcircle, symbolsize=16),                      
          F2(color=red, symbol=solidcircle, symbolsize=16),
          C1(color=black, symbol=solidcircle, symbolsize=16),
          T1(color=blue, filled=true, transparency=0.95)
        ],
        axes=none
      ):end:
  
 nFig := 180.0:

   Figs := seq(Fig(2*Pi*i/nFig), i = 0.1 .. nFig-1.0):
   display(Figs, insequence = true);
intersection: two given lines are ParallelLine, no intersection
Error, (in geometry:-draw) unknown geometric object  P
Error, (in plots:-display) expecting plot structure but received: Figs
How to overcome this difficulty? Thank a lot.

1 2 3 4 5 6 7 Page 1 of 8