acer

32353 Reputation

29 Badges

19 years, 331 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@dingtianlidi Sorry I was not clear.

I meant that the COLOR substricture could be manuaĺly constructed from the curves x.y.z data. I'll try to find time to show you what I mean, but I've got some pressing thing to do right this moment.

You should contact Maplesoft Technical Support.   You can email them at 

   support@maplesoft.com

Please don't start additional and separate threads here, about this severe lack of function. It's more helpful to keep this all together.

@Carl Love What might be tricky is the deployment of any quaternion package so that it is bundled with the Mobius application that the OP is authoring. The key thing might be to make it directly available to any end-user of the "app".

I was thinking that the Tech Support staff of DigitalEd might know best how to do that part (in the most graceful way appropriate to MapleTA or a Mobius App).

The MapleTA and Mobius products are now produced and sold by DigitalEd, and no longer by Maplesoft.

This site is run by Maplesoft. I doubt that many Mobius users or DigitalEd staff monitor it.

You may be better off trying their tech support,

    http://digitaled.com/support

Another way to get a similar plot (but perhaps not so flexible, as not directly using the parameter), is as follows.

restart;

with(plots):

Cl := x->max(-1,min(1, x)): f := (x,y)->Re(sqrt(x+I*y)):
M := 15: R := 5: local O := 0.1:

F := [Cl((j+O)/R*cos(2*Pi*t)), Cl((j+O)/R*sin(2*Pi*t)),
      signum(k)*(abs(k) - 1.5)/140
      + signum(k)*f(Cl((j+O)/R*cos(2*Pi*t)),Cl((j+O)/R*sin(2*Pi*t)))]:

Pcurves:=display(seq(seq(spacecurve(F, t=0..1, thickness=3,
                           colorscheme=["linear",
                                        [red,ColorTools:-Color("RGB",[1,0,0.001])],
                                         colorspace="HSV"]),
                         k=[-2,-1,1,2]),j=1..R+3)):
Pcurves;

optsurf := grid=[70,70], style=surface, transparency=0.1, color=u:
ee := evalc(Re(sqrt(x+I*y))):
ff := simplify(eval(ee,[x=v*cos(u),y=v*sin(u)])) assuming real:
Psurf:=display(seq(plot3d([v*cos(u), v*sin(u), k*ff],
                          u=0..2*Pi, v=0..4, optsurf),
                   k=[-1,1]),
               view=[-1..1,-1..1,-1..1]):

display(Psurf,Pcurves);

 

Download spacecurve_colorbyparam2.mw

Note: The backend MapleNet server of this site cannot properly render such colored curves when displaying inline here. (Might be an hfarray vs Array thing...) So I've pasted in the .png exports of the plots.

@Stretto I happened to find this old piece of code. (I was coloring spacecurves by torsion and curvature, as functions of the parameter...). Perhaps its results are a little closer to what you're after. You might adust, of course.

restart;

with(plots):

Cl := x->max(-1,min(1, x)): f := (x,y)->Re(sqrt(x+I*y)):
M := 15: R := 5: local O := 0.1:

cfunc:=proc(tt,j)
  local L:=[j/(R+3),j/(R+3)*sin(2*Pi*tt)^2,tt];# print(L);

  ColorTools:-Color("RGB",L)[];

end proc:

SC:=proc(T::list, j, trng::name=range(realcons),
         {numpoints::posint:=3, colorfunc::procedure:=NULL})
  local M,C,t,a,b,i;
  t:=lhs(trng);
  (a,b):=op(evalf(rhs(trng)));
  M:=[seq(eval(T,t=a+i*(b-a)/(numpoints-1)),i=0..numpoints-1)];
  if colorfunc=NULL then C:=NULL;
  else
    C:=':-COLOUR'(':-RGB',Array([seq(colorfunc(a+(i-1)*(b-a)/(numpoints-1),j),
                                     i=1..numpoints)],
                                ':-datatype'='float[8]',':-order'=':-C_order'));
  end if;
  :-PLOT3D(:-CURVES(M,C),':-THICKNESS'(3));
end proc:

display(
  seq(seq(SC([Cl((j+O)/R*cos(2*Pi*t)), Cl((j+O)/R*sin(2*Pi*t)),
              sign(k)*(abs(k) - 1.5)/140
              + sign(k)*f(Cl((j+O)/R*cos(2*Pi*t)),Cl((j+O)/R*sin(2*Pi*t)))],
             j, t=0..1, numpoints=150, colorfunc=cfunc),
          k=[-2,-1,1,2]), j=1..R+3));

cfunc2:=proc(tt,j)
  local L:=[tt,1,1];# print(L);

  ColorTools:-Color("RGB",ColorTools:-Color("HSV",L))[];

end proc:

Pcurves:=plots:-display(
  seq(seq(SC([Cl((j+O)/R*cos(2*Pi*t)), Cl((j+O)/R*sin(2*Pi*t)),
              sign(k)*(abs(k) - 1.5)/140
              + sign(k)*f(Cl((j+O)/R*cos(2*Pi*t)),Cl((j+O)/R*sin(2*Pi*t)))],
             j, t=0..1, numpoints=150, colorfunc=cfunc2),
          k=[-2,-1,1,2]), j=1..R+3)):
Pcurves;

optsurf := grid=[70,70], style=surface, transparency=0.1, color=u:
ee := evalc(Re(sqrt(x+I*y))):
ff := simplify(eval(ee,[x=v*cos(u),y=v*sin(u)])) assuming real:
Psurf:=display(seq(plot3d([v*cos(u), v*sin(u), k*ff],
                          u=0..2*Pi, v=0..4, optsurf),
                   k=[-1,1]),
               view=[-1..1,-1..1,-1..1]):

display(Psurf,Pcurves);

 

Download spacecurve_colorbyparam.mw

@Axel Vogt 

restart;
kernelopts(version);

      Maple 2018.2, X86 64 LINUX, Nov 16 2018, Build ID 1362973

g:=exp(r*cos(theta))/Pi+exp(r*cos(theta))*cos(theta)/Pi:
Int(g, theta = 0 .. Pi):
value(IntegrationTools:-Expand(%)) assuming r>0;

         BesselI(0, r) + BesselI(1, r)

# Or,

int(g, theta = 0 .. Pi):

IntegrationTools:-Expand(%) assuming r>0;

         BesselI(0, r) + BesselI(1, r)

The two separate integrals are obtained by method=lookup, but that is not being successfully used against the sum.

Could you not utilize the assuming mechanism for the key simplifications?

Show us what youve been able to do so far with this homework question.

@zphaze I'll look into this, as well as another kind of evalf-related bug in it that I know of.

Perhaps you're also the fellow who asked about saving the module to an archive. There are a few subtleties (including ModuleLoad material), but nothing not easily resolved.

If you give me a couple of days (it's Sunday night...) I'll look into these bug/issues which I expect are easily resolved, as well as show/verify both the module saving as well as cloud-package creation. I've been meaning to do all that for some time now.

I will post in this thread, when progress is made.

Show us how far you've gotten already with this homework. 

What does it mean, pasting in a polynomial from Mathematica to Maple? How does that statement make sense, without context? You haven't even said in what format or syntax that would act.

Also, are you trying to paste in 10k term expressions into Maple in 2D Input mode? That sounds dubious at best.

Why not write out a poynomial in plaintext form to a text file from Mma, and then read it into Maple?

@kfli The `.` command already goes straight through the kernel to the MKL BLAS dgemm and I doubt that you'd be able to beat that for most large sizes.

I say "most large sizes" because your goal is still very unclear, in terms of what I'd consider necessary in order to arrive at an efficient solution without runaround guesswork.

You haven't stated that your Matrices/Arrays are float[8], but I suspect that they are. You haven't stated whether you need a modest number of very large examples to run fast, or a very large number of small examples to run fast (by avoiding overhead). You haven't stated whether you want to be able to do this kind of inplace BLAS operation (possibly with the actual transposition being avoided):
    C <-  A . B  + C   or    C <-  alpha.A^%T . B^%T + beta*C
etc. If you really need such cases (ie. inplace action on C to avoid garbage collection, without overhead) then please describe the scenarios in fine detail.

 

It would be much better if your clearly explained your broader goal, rather than showing us difficulties you have with your attempts at getting there.

@vv 

restart;

kernelopts(version);

`Maple 2018.2, X86 64 LINUX, Nov 16 2018, Build ID 1362973`

eqa := x(n) = x(n-1)*(9+n)*(10-n)*F(n)/(2*n);

x(n) = (1/2)*x(n-1)*(9+n)*(10-n)*F(n)/n

H := rsolve({convert(eqa,signum),x(1)=1},x(n));

H := piecewise(1 <= n and n < 10, -(-1)^n*2^(1-n)*(product(F(n0+1)*(n0^2+n0-90)/(n0+1), n0 = 1 .. n-1)), 0)

HH := factor(combine(convert(eval(H,F=(n->(-1)^n)),factorial))) assuming n::integer;

HH := piecewise(n < 1, 0, n < 10, -(-1)^((1/2)*n*(n+5))*2^(-n)*factorial(9+n)/(45*factorial(9-n)*factorial(n)), 10 <= n, 0)

seq(HH,n=1..12);

1, 22, -308, -3003, 21021, 105105, -360360, -765765, 765765, 0, 0, 0

 

Download rsolve_goofy.mw

First 191 192 193 194 195 196 197 Last Page 193 of 592