Kitonum

21860 Reputation

26 Badges

17 years, 239 days

MaplePrimes Activity


These are replies submitted by Kitonum

@felixp  I used the codes from Carl Love's  comment  I missed that

My outputs are

educed(<0,0,0,1; 1,3,0,4>);

reduced(<1,3,0,4; 0,0,0,0>);

reduced(<0,0,0,0; 1,3,0,4>);

reduced(<1,3,0,4; 0,0,0,1>);

reduced(<0,0,0,0; 0,0,0,1>);

reduced(<0,1,1,1; 1,1,1,1>);

reduced(<1,0,1,1; 1,1,1,1>);

  

We get the same error in all cases.

@Carl Love  in each of which your  reduced  proc is not working properly;

reduced(<0,0,0,1; 1,3,0,4>);

reduced(<1,3,0,4; 0,0,0,0>);

reduced(<0,0,0,0; 1,3,0,4>);

reduced(<1,3,0,4; 0,0,0,1>);

reduced(<0,0,0,0; 0,0,0,1>);

reduced(<0,1,1,1; 1,1,1,1>);

reduced(<1,0,1,1; 1,1,1,1>);

@Carl Love 

1) Permutations of a set and the corresponding list give the same result:

restart;

combinat:-permute([1,2,3]);

combinat:-permute({1,2,3});

                            [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]

                            [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]]

 

2) Enumeration in a multiple cycle more efficient. Compare:

 

t:=time():

for i to 100 do

for j to 100 do

for k to 100 do

i+j+k;

od: od: od:

time()-t;

                                                                  0.203

and

t:=time():

P:=combinat:-permute(`$`~([$1..100], 3),3):

for k in P do

`+`(k[]);

od:

time()-t;

                                                                  21.563

 

Of course, this is not essential for OP's problems.

@lg674 

Curve := proc(Range, a, b, c)  # Range is the range for t

local R, Phi, Theta;

R:=r(t,a,b,c); Phi:=phi(t,a,b,c); Theta := theta(t,a,b,c); plots:-spacecurve([R*cos(Phi)*sin(Theta), R*sin(Phi)*sin(Theta), R*cos(Theta)], t = Range, color = red, thickness = 2, linestyle = solid, axes = normal, orientation = [10, 50]);

end proc:

 

r := (t, a, b, c)->a*cos(t)+b*sin(t)+c:

phi := (t, a, b, c)->a^2*cos(t)+(b-1)*sin(t)+c+1:

theta := (t, a, b, c)->a^3*cos(t)+(b^2-1)*sin(t)+c^2+1:

 

Cone := (R, Theta) -> plot3d(eval([r*cos(phi)*sin(theta), r*sin(phi)*sin(theta), r*cos(theta)], theta = Theta), r = 0 .. R, phi = 0 .. 2*Pi, scaling = constrained) :

 

plots[display](Cone(8, (1/6)*Pi), Curve(0..2*Pi,1,2,3));

@san  I replaced  matrix  command by  Matrix  command, because matrix command is deprecated, and removed the  space between the  matrix  command and the subsequent opening parenthesis:

 

Download ch512_new.mw

 

@Ronan  If you want to add  0 to C2  in 4th position you can do it as follows:

C2:=[a,2,1-3*a,a^2-5,7*a,a^2]:

[C2[1..3][], 0, C2[4..-1][]];

                            [a, 2, 1-3*a, 0, a^2-5, 7*a, a^2]

@Markiyan Hirnyk  3. We have

expand(eval({x=9*z^2+3*z+367, y=6*z^2+z+244}, z=n+1/3));  # My nontrivial answer

expand(subs(n=n-1, %));   # We got Mathematica nontrivial answer

 

 

 

@Markiyan Hirnyk  

I know. For full automation, we can write

restart;

minimize(sin(x+y), x=-1..1, y=-1..1);

solve({sin(x+y)=%, abs(x)<=1, abs(y)<=1});

                  

 

 

 

@Carl Love  I usually insert a code text and images separately. The first by copying and pasting, and the second by making a screenshot and it's processing in Paint. Of course, it takes more time, but gives better quality pictures. I use Google Chrome, and Standard Interface for pictures.

 

@Carl Love   you are right. The simple example shows it very well:

plot(abs(x), x=-1..1, style=point, numpoints=20):

plot(abs(x), x=-1..1, style=point, adaptive=false, numpoints=20):

plots[display](<%% | %>, scaling=constrained);

    

 

 

 

@Carl Love  Thank you for the clarification of application of this option. Can you give an example of when  numpoints  is not enough for providing the exact number of points?

@Earl  You wrote " it appears that the surface between a pair of ribs in not a portion of a sphere but a minimal surface. Is this true? "

 It is not true. In fact, the surface of this umbrella is part of a sphere, which is above the octagon between two brocken lines  -P  and  P.

Here the plotting of this surface without the ribs with the side projecting surface:

P := piecewise(-2 < x and x < -sqrt(2), sqrt(2)*(x+2)/(2-sqrt(2)), -sqrt(2) < x and x < 0, (2-sqrt(2))*x/sqrt(2)+2, 0 < x and x < sqrt(2), (sqrt(2)-2)*x/sqrt(2)+2, sqrt(2) < x and x < 2, sqrt(2)*(x-2)/(sqrt(2)-2)):

plot3d(sqrt(-x^2-y^2+9), x = -2 .. 2, y = -P .. P, color = "HotPink", style = surface, scaling = constrained, axes = normal, numpoints = 5000, filled = true, view = [-2.45 .. 2.45, -2.45 .. 2.45, 0 .. 3.45]);

                        

 

 

 

@lg674   I corrected some syntax errors in your file. But the curve is still not plotted, because the function  phi(t,1,2,3,4) takes complex values. See attached file.

Plots_new.mw

@lg674  Please give the full text of the code in which the error occurs.

@matthew_spire  I have noticed that in Maple 2015 and Maple 2016  (at least on my machine under Windows 8) by default  style=surface  occurs without lines.  If you write linestyle=solid, it will be  a surface with lines.

First 81 82 83 84 85 86 87 Last Page 83 of 134