Ronan

1341 Reputation

15 Badges

13 years, 140 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

@Carl Love Very nice. The background is, I  am doing a Cross Ratio procedure that handles  single numbers,  [x,y] , [[x,y,z] points and projective points <x,y,1>. Was checking for collinearity (to catch errors). It all fell apart with the projective point at infinity <x,y,0>. 
Usually I check collinearity of  three points with the determinant of a 3 x 3 matrix = 0. In this case I have to form a plane and selecting the <x,y,0>  point to form the vectors from ensures the Cross Product is not 0. 

Edit:- And after all that trouble to test for collinearity, it becomes void when applied to a conic.

@acer As far as I can see only need to find one zero. If these is another 0 the cross procuct still works and if 4th is on the plane the dot procuct is still 0. If I have two 0's I probably have other problems.

@C_R   How did you get 2024.1? 

@Scot Gould Ahh. I was wondering what the difference is between them.Is there anything pitfalls of if vs itelse in these contexts?

@dharr  Very nice. I figured there was some real efficient way. 

@acer Yes intersectplot is a sledge hammer to crack a nut here.  transform definately a good solution generally. Without having to restructure all my procedures that produce expressions is there a way of getting plot to work with say

-(13*x)/12 - (5*y)/8 + 71/96

obviously 

plot(solve(L23,y),x=-3..2,adaptive=false,numpoints=2)

works. But that is, I'd say replacing one hammer with another.

@acer I noticed this a while ago in Maple 2024 on Win 10. GUI Tools->Options->Display setting, If I change the typesetting level to Standard and and either apply to session or globally, when I repopen the Display settings (even immediatly) it is set to Extended. 

I don't have anything special set in the  .ini file that should cause this. Has anyone else seen this?

@acer Very Very well explained.

@acer   

Edit. I hadn't read your full reply.  The simpler version is understandable assuming the<>{} is checking for and empty set. 

Thank you. I am just trying to understand how the code works.
so the u->indets(rhs(u)  sets up the mapping

And(name,Not(constant),   detects constants like Pi and gamma etc

satisfies(nm->depends(rhs(u),nm))))<>{}   This I do not understand at all. 

	
selectremove(u->indets(rhs(u),
                       And(name,Not(constant),
                           satisfies(nm->depends(rhs(u),nm))))<>{}, C)

 

@acer Thank you. And the oracle is?. The expressions will be burried inside a proc in a package. Well probably have a couple of options on what to return/display. If all the parameters (a..f) are numeric/real then just eval the expression completly and return as a pair.

If  the parameters are algebraic eg a = 4+K*sqrt(7)   then return the large expression format elided.
I can check that as follows.

vals:=[a=18,b=sqrt(21)+5,c=-(7),d=-29,e=-37,f=-56]

`and`~(seq(is(rhs(vals[i]),real),i=1..nops(vals)))

@acer  That is powerful.
 I made your procedure also return the Qs for numerical evaluation.I could not get changing Q to another symbol to work because of this.

 I see what you mean about codegen:-optimize(eqn)

I managed to reduce the length of some of the Q expressions by factoring them. 

This will be great for displaying these expressions in the table layout and term elision you helped me with a couple of week ago.

Subs_Recur_ac.mw

@C_R So you mean change this

indets(eqn) minus indets(eqn,name);
subexpr:=map(op,%) minus indets(%,fraction):# remove of root terms - instead of filtering for `^`

indets(eqn,`^`) gives, which has  the a^2 ...e^2
 

{a^2, b^2, c^2, d^2, e^2, 1/(a*c - b^2/4), 1/(4*a*c - b^2)^2, (4*a*c*f - a*e^2 - b^2*f + b*d*e - c*d^2)^2, sqrt((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), sqrt(2*sqrt((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) + (-8*a*f + 2*d^2)*c^2 + (8*a^2*f - 2*a*d^2 + 2*a*e^2 + 2*b^2*f - 2*b*d*e)*c - 2*a^2*e^2 - 2*a*b^2*f + 2*a*b*d*e), sqrt(2*sqrt((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) + (8*a*f - 2*d^2)*c^2 + (-8*a^2*f + 2*a*d^2 - 2*a*e^2 - 2*b^2*f + 2*b*d*e)*c + 2*a^2*e^2 + 2*a*b^2*f - 2*a*b*d*e)}

@C_R That is a good step forward. I'll apply this to some "beautiful" other expressions I have. 

I have been half thinking about setting up a procedure if I get a good all round handling.

Will let you know.

@acer How do you change the prompt. I presume you mean the >. Could you give a short exampple of commenting out the code with this method? I have used the (*.........*) in the VS coce editor.

If you are asking about Maple's default help database it not allowed.

From System, Help, About Help Databases

It states.

Types of Help Databases in Maple
  Read-only Help Databases
The shipped Maple .help files, which are located in the \lib directory of your Maple installation, are read-only files. This means that you cannot add to, remove from, or edit this collection of help pages.
 

5 6 7 8 9 10 11 Last Page 7 of 32