1117 Reputation

12 years, 104 days

Can A3 print size be installed for Maple...

Maple 2024

I would like to print my help pages to pdf. Is there a way to install A3 paper size. That would help in maintaining the layout as seen on the screen.

Maybe there is an alternative approach.

How to select element with z=0...

Maple 2024

Have a list of four projective points. I need to check that they are colinear projectively. If one point is at infinity i.e. 0 in z position I can chech if combination of cross product and dot product is 0.
a)  What is a good way to find if one ot the four has zero in z position?

b) Having found that is there a neat way of piching the next two/three points by making the count wrap automatically. e.g 3  then 4,5,6 i.e. 3,4,1,2

 (1)

 (2)

 (3)

Intersectplot line quality ...

Maple 2024

I am using intersectplot  to make projective coordinate plots. Everything intersects the plane z=1. I find the plot quality poor, i.e. dotty dashy lines and circle. This seem to be the best linestyle=solid can do here. gridrefine can't be applied here.
Any suggestions to improve quality here?
Maybe intersectplot is not the best aprroach here but so far it is all if have figured out.

 > restart
 >
 >
 > with(plottools)
 (1)
 > with(plots)
 (2)
 >
 >
 > DistCircle:=x^2+y^2=1
 (3)
 > pt1:=[1/4,3/4]
 (4)
 > pt2:=[7/8,-1/3]
 (5)
 > pt3:=[-3/2,3/7]
 (6)
 > pt4:=[3/5,-4/5]
 (7)
 > pt5:=[-1/10,-3/2]
 (8)
 >
 > L12:=-(13*x)/12 - (5*y)/8 + 71/96; #LnPeqns(pt1,pt2);
 (9)
 > L13:=-(9*x)/28 + (7*y)/4 - 69/56; #LnPeqns(pt1,pt3);
 (10)
 > L23:=(16*x)/21 + (19*y)/8 + 1/8; #LnPeqns(pt2,pt3);
 (11)
 > L35:=(27*x)/14 + (7*y)/5 + 321/140; #LnPeqns(pt5,pt3)
 (12)
 > nullline:=3/5*x-4/5*y-1
 (13)
 > ptplt:=point([pt1,pt2,pt3,pt4,pt5],color="Green",symbol=solidcircle,symbolsize=10): txtplt:=textplot([pt4[],typeset("pt4")],align={below,right}):
 > plt1:=display(txtplt,implicitplot([DistCircle,L12,L13,L23,L35,nullline],x=-2..2,y=-1.5...1.5,color=[red,blue,blue,blue,blue,cyan]),ptplt,scaling=constrained)
 >
 > # Projective Geometry Version
 > DistCirclez:=x^2+y^2-z^2;  #a Cone
 >
 (14)
 > pt1p:=[pt1[],1]; pt2p:=[pt2[],1]; pt3p:=[pt3[],1]; pt4p:=[pt4[],1]; pt5p:=[pt5[],1];
 (15)
 >
 >
 >
 > L12p:=(13*x)/12 + (5*y)/8 - (71*z)/96;#LnPeqns([pt1p,pt2p,[0,0,0]]);
 (16)
 > L13p:=(13*x)/12 + (5*y)/8 - (71*z)/96;#LnPeqns([pt1p,pt3p,[0,0,0]]);
 (17)
 > L23p:=(9*x)/28 - (7*y)/4 + (69*z)/56;#LnPeqns([pt2p,pt3p,[0,0,0]]);
 (18)
 > L35p:=(27*x)/14 + (7*y)/5 + (321*z)/140;#LnPeqns([pt3p,pt5p,[0,0,0]]);
 (19)
 > L04p:=3/5*x-4/5*y-1*z;
 (20)
 > ptpltp:=point([pt1p,pt2p,pt3p,pt4p,pt5p],symbol=solidsphere, symbolsize=8,color="green"): intp1:=intersectplot(DistCirclez,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,linestyle=solid):#unit circle at z=1 intp12p:=intersectplot(L12p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue): intp13p:=intersectplot(L13p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue): intp23p:=intersectplot(L23p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue): intp35p:=intersectplot(L35p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=blue): intp04p:=intersectplot(L04p,z=1,x=-2.5..2.5,y=-2.5..2.5,z=0..1,color=cyan):
 >
 > display(ptpltp,intp1,intp12p,intp13p,intp23p,intp35p,intp04p,scaling=constrained,caption="Projective Co-ords on plane z=1",axes=normal,axis[3]=[tickmarks=[1]])
 >

Selecl Remove from a set...

Maple 2024

How do I get the susset that contains unknowns on the rhs of the elements?

 > restart
 >
 > # I need this subset {a=1/sqrt(2+A), b=6*sqrt(4+N),  d=5*H}
 >
 > C:={a=1/sqrt(2+A),b=6*sqrt(4+N) ,c=sqrt(7),d=5*H,,e=-12,f=-96}
 (1)
 > selectremove(has,indets(rhs~(C)),C)
 (2)
 > selectremove(has,lhs~(C)=indets(rhs~(C)),C)
 (3)

eval{recurse] Vs simplify with Side rela...

Maple 2024

This question is as much an observation of somthing I accidently stumbled across. I was using eval[recurse] to evaluate expressions reduced with LargeExpressions. I found eval['recurse'](eval['recurse']([Expr1 , Expr2] , [Q=.. Q1=.....])[]) to be better than simplify(eval['recurse']([Expr1 , Expr2] , [Q=.. Q1=.....])[]).

I only realised what was happening  when I put the below together. Then I could see the wood from the trees.

It would be interesting to know why.

 > restart
 >
 > Pt:=[[(sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(Q[6])*(t^2 + 1)/(sqrt(sqrt(Q[2])/(4*a*c - b^2)^2)*sqrt((2*sqrt(Q[2])*a*c^2*e^2 + 2*sqrt(Q[2])*b^2*c^2*f - 8*sqrt(Q[2])*a^3*c*f + 2*sqrt(Q[2])*a^2*b^2*f + 16*sqrt(Q[2])*a^2*c^2*f + 2*sqrt(Q[2])*a^2*c*d^2 - 4*sqrt(Q[2])*a^2*c*e^2 - 8*sqrt(Q[2])*a*c^3*f - 4*sqrt(Q[2])*a*c^2*d^2 + 2*sqrt(Q[2])*a^3*e^2 + 2*sqrt(Q[2])*c^3*d^2 - 2*sqrt(Q[2])*b*c^2*d*e + 4*sqrt(Q[2])*a*b*c*d*e - 2*sqrt(Q[2])*a^2*b*d*e - 4*sqrt(Q[2])*a*b^2*c*f + sqrt(Q[2])*sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(2*sqrt(Q[2]) - 2*Q[10])*Q[7] - 2*Q[11])*signum((sqrt(Q[2])*sqrt(2*sqrt(Q[2]) + 2*Q[10])*sqrt(2*sqrt(Q[2]) - 2*Q[10])*Q[7] - 8*((a - c)^2*sqrt(Q[2])/4 + Q[5]/4)*Q[8])*Q[4])*Q[4])*(t^2 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- b^2)], [Q[2] = (a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2, Q[4] = 1/((a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2), Q[5] = (a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(a + c), Q[6] = signum((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)/(4*a*c - b^2))*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)/(4*a*c - b^2), Q[7] = csgn((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(b*I + a - c)*I)*b, Q[8] = 4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2, Q[9] = csgn((4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)*(b*I + a - c)*I), Q[10] = (a - c)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2), Q[11] = (a + c)*(a^2 - 2*a*c + b^2 + c^2)*(4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2]]:
 > length(Pt);  # was >27,000
 (1)
 > valsh:=[a = -9, b = -9, c = 16, d = -10, e = 7, f = -36]
 (2)
 > S1:=eval['recurse'](Pt,valsh)[];
 > length(%)
 >
 (3)
 > simplify(S1);# this is  simplify with side retations length(%)
 (4)
 > simplify(%%); length(%)
 (5)
 >
 > S2:=eval['recurse'](eval['recurse'](Pt,valsh)[]);# I find this interesting length(%)
 (6)
 > simplify(S2); # length(%)
 >
 (7)