Carl Love

Carl Love

28035 Reputation

25 Badges

12 years, 318 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Carl Love Even without the wireframe, the use of cylindrical coordinates for the surface eliminates the gap between the upper and lower surfaces, even at modest resolution (I used 53x53 above).

There must be an underlying implementation of Maple supporting this Mobius. To what extent does the Mobius user have access to that? It would be easy to write a quaternion package for Maple. Would you be able to install and access it?

@zphaze I formally reported the bug.

It's not a new feature. Loops have always been that way. 

@ActiveUser All parts of Maple"s looping command that come before the word do are optional and always have been. 

@Scot Gould While it is true that the originally posted worksheet is missing a division operator in the parameters section of its Explore command, this is not the cause of the errors shown,. If you compare your worksheet with the OP's, you'll see that the latter has no boundary markers separating the regions of expository text from the executable code. (These markers can be seen in the extreme left margin of almost any worksheet.) I don't know whether this is the OP's doing, or whether the worksheet got mangled by MapleCloud.

And this is the same plot with the only difference being that I turned off transparency:

Here is the plot done in cylindrical coordinates. By using this, it's possible to get just the radial lines of the grid, plus a border. In my opinion, the syntax makes it much easier to color a grid (aka wireframe) in a plot3d than it is to color a spacecurve. In the plot below, the radial lines are colored by the imaginary part.

restart
:
f:= (r,theta)-> r*cos(theta/2): #Re(sqrt(z))  
Square:= piecewise(
    theta < -3*Pi/4, -sec(theta), #x = -1
    theta < -Pi/4,   -csc(theta), #y = -1
    theta < Pi/4,     sec(theta), #x =  1
    theta < 3*Pi/4,   csc(theta), #y =  1
                     -sec(theta)  #x = -1
):
plots:-display(
    plot3d(
        (common:= 
           [seq([r, theta, k*f(r,theta)], k= [-1,1])], 
           r= 0..Square, theta= -Pi..Pi, coords= cylindrical
        ), 
        grid= [53$2], style= surface, glossiness= 1, 
        transparency= .002,    #close to the min value that does anything
        colorscheme= [         #adaptation of your original coloring:
            "xyzcoloring", 
            [(x,y,z)-> y^2, (x,y,z)-> abs(x*y), (x,y,z)-> x^2]
        ]
    ), 
    plot3d(
        common,
        grid= [2,23],                     #Shows only the radial lines. 
        style= wireframe, thickness= 3, 
        color= abs(r*sin(theta/2))             #abs(Im(sqrt(z)))  
    ),
    lightmodel= light2, orientation= [55,75,0], projection= .85, axes= frame,
    labels= ['x', 'y', Re(w)]
);

@Stretto There are 31 predefined 3d coordinate systems, and you can also define your own. These are documented on help page ?coords. Of course, the most important are rectangular (default), cylindrical, and spherical. You can use them in a 3d plot by using the coords option. I'll post an example (your Riemann surface in cylindrical coordinates) as a followup to my Answer.

Note that Acer used cylindrical coordinates by manually doing the appropriate coordinate transformation and plotting in default rectangular coordinates. But by explicitly using coords= cylindrical, it's possible to get just the radial lines plus a border.

@Kitonum Maple 12 doesn't have the key option to sort.

@panke As I pointed out above, what you've written is not an equation; it's an assignment. If you want an equation, use =, and there'll be no error message.

@panke Yeah, I understand perfectly what the cause of your error is. But the problem is that what you're trying to do makes no sense mathematically. 

@ismonder Thanks. Hopefully this will help someone figure out what the problem is. For the sake of completeness, you should probably upload (as an attached file rather than as a screen shot) whatever part of the worksheet that you were able to save.

Also (and this may not matter), you still haven't followed the simple instructions that I gave. AFTER the command or commands that don't work, please put a command that does work, like 2+3. I repeat: This is just to obtain diagnostic information. I don't need to see more commands that don't work.

When you say "I press enter, and nothing happens", do you mean 

  1. the cursor doesn't move at all, or
  2. the cursor moves to the next line (where on the next line?), or
  3. you get a new command prompt, and the cursor is next to it, or
  4. something else?

@ismonder Can you please post a screenshot of these things, in this order, all on one screen:

  1. A command that DOES work, such as 2+3;
  2. Its output; FOLLOWED BY,
  3. A command that doesn't work, such as that plot command;
  4. (This one may not be possible) Another command that DOES work;
  5. Its output.

If 4 & 5 are not possible, then what happens if you press Control-J? Do you get a new command prompt? If so, try entering another command that DOES work at the new prompt.

This is only to obtain diagnostic information that may help in solving your problem. I'm not saying that any of the above will, by itself, solve your problem.

@Stretto If you use Iterator:-Permute([a, b, c, d, e]), then the order of the results will depend on the lexicographic ordering of the list entries rather than the order that they appear in your original list. In other words, the result of the above is exactly the same, and in exactly the same order, as Iterator:-Permute([e, d, c, a, b]). If that's okay for you, that's great, go ahead and use it. I was simply a bit hesitant to recommend it to you because you said "deterministically", and it seems to me like that makes it not 100% deterministic because it depends on Maple's somewhat-idiosyncratic lexicographic ordering.

If the original-list order does matter to you, then use

A:= Array([a,b,c,d,e]): # Array of elements to permute
for p in Iterator:-Permute(numelems(A)) do
    printf("%{}a\n", A(p));    # print (replace with something useful)
end do:

The code immediately above is only correct if the list has no repeated entries! If you want to work with repeated entries, and the original-list order matters to you, then let me know.

By default, Iterators from this package are converted to C and compiled. That compilation takes about 0.2 to 0.3 seconds (on my computer). This is not worth it for an iterator that only has a small number of iterations (such as the above). In that case, use option compile= false on the Iterator command. 

First 220 221 222 223 224 225 226 Last Page 222 of 708