C_R

3427 Reputation

21 Badges

5 years, 329 days

MaplePrimes Activity


These are replies submitted by C_R

@Thomas Richard

The goal was to improve a quantitative interpreation of the color coding of complexplot3d. What I had initially in mid was a color bar with values. Since this is very tricky I thought about a simpler colorcoding which clearly distinguishes -Pi, 0 and Pi. Either with less colors (blending from red to blue for example) or with a discrete scale. The second idea comes with rendering artefacts which would require switching from a grid to a mesh of plotpoint that follows contourlines. Tricky as well. Maybe I should switch to a polar plots with a radial grid and abandon colorplot3d which I like for the simple reason that "all" is contained in one plot.

I will give plotcompare a try.
 

step:=12;
plot3d(argument(re+I*im), re=-2..2, im=-2..2,
       color=round(step*argument(re+I*im)/2/Pi)/step,
       style=surfacecontour, lightmodel=none,
       labels=[Re(z),Im(z),``], orientation = [-90, 0, 0],grid=[40,40]);

 

To my answer above I can add that the expressions you apply solve on have, depending on the parameters a,b,c, more than one solution. Solve cannot return all solutions.

p__1 and p__2 are therefore only solutions for one root and not necessarily identical (in the complex domain).

 

@Scot Gould 

Your parameter set describes roots on a unit circle

subs(c = -1, a = 1, b = 1, c = p^a*p^b);
solve(%);
                                  2
                            -1 = p 

                             -I, I

By conicidence the two solutions p_1 and p__2 prodcue the same roots as the polynom. With b=2 all would have been less mysterious. It took me a while to recognize this discrepancy between my answer and yours.

@acer 

That is very instructive. I used complexplot3d for convenience but the plot3d with re and im is easier to understand and even shorter.

This link is unfortuneately not working Download plot3d_cplx.m

Thank you!

@Carl Love 

Some thoughts:

A simple flag could be implementend for each Maple input line this way: If Maple_input_has_changed AND Input_not_send_to_Maple_server then set flag=true.

(and: If_output_received then set flag=false)

This would be an improvement but will fail in the following screnario:

A user opens a document and changes one input line at the end of the document, because the input refers to equation numbers and no entiere execution of the document is required to generate "correct". The user oversees that also names are used in the input that have been assigned to a value. After exceution of the input line the new output will show the name but not its value.Then the user saves the document with "wrong" output.

To adress this, Maple's GUI must somehow be capable to analyse the input for situations where execution of a single line will potentially give an output that is different from the execution of the whole document and at least inform the user. I am not sure if this is easily possible.

In any case, the benefit of whatever implementation must be weighed against the effort and that is a product management decision rather than a developers choice.

@Carl Love 

I compared to subs but forgot the eval...

eval(subs(int = 1, expr))

All clear now.

Thanks

@Carl Love 

Does the help page of eval describes this special syntax?

@dharr 

With plottools/rotate also equatorial poles should be possible. Below is an assembled sphere with plots/display animated with plots/display. I can test a few things with it.

Thank you

 

@dharr 

With your code at hand I could have provided a good example what I want to visualize

restart;
ball:=plot3d(1, 0..2*Pi, 0..Pi,coords=spherical,style=surface,axes=none,
 color=proc(theta,phi) if phi>Pi/8 then
                    if theta>Pi then 0.15 else 0.5 end if
                  else
                    if theta>Pi then 0.75 else 1 end if
                 end if
       end proc):
plots:-display(seq(plottools:-rotate(ball,angle/3,angle/2,angle),angle=0..12.*Pi,Pi/10.),insequence);

Coloring north (and south?) poIe revals already details of a tumbeling motion. Adding equatorial poles is not that obvious in spherical coordinates.

I have to study color functions.

Thanks

@Rouben Rostamian  

Yes, if the facettes could be colored individually, I would in a frist attempt color facettes on three orthogonal axes with a distinguishable color set and pin it to a rotating body that changes the axis of rotation to see if this can be recognized.

Is that (coloring of facettes) possible?

Update: I have not found an easy way to create multi-colored objects. The geom3 package is vast. Maybe it is easier to define some facettes as stickers and pin them to a body (e.g. a semi-transparent sphere). I will do some experiments and see how easy that is.

The animation you send already reaveals some weaknesses of my initial ideas. Very helpfull.

Thank you

@acer 

Yes I missunderstood you. Probably because the readers of your original post immediately jumped on rendering planets.

If I would understand the mapping process from images to spheres better I could preselect images or draw them myself (like drawing on a stero net for stereographic projection).

I had a few attempts with the image option but got the artefact other readers were reporting (only a part is mapped correctly). Your code with the image option seem to work better.

plot3d(1, x=0..2*Pi, y=-Pi..Pi, coords=spherical, style=surface,
       image="http://www.vendian.org/mncharity/dir3/planet_globes/TemporaryURL/mars0_src_smaller.jpg", scaling=constrained, orientation=[-70,-40,180]);

And one time I got the earth mapped mirrored.

restart:
with(ImageTools):
im:=Read(cat(kernelopts(mapledir),"/data/PathFindermap.jpg")):
im:=Scale(im,1):
plot3d(1, x=0..2*Pi, y=0..Pi, coords=spherical, style=surface,
       image=im, orientation=[-100,-70,170]);

I still hope that I do not have to develop patterns myself. 

@Carl Love 

Corrected. Thanks

@acer 

That is an interesting option.

For a regular pattern (e.g. a football, truncated icosahedron) it would require to generate corresponding images by an appropriate projection (seems to require some low level coding in Maple).

In any case it would require ways to describe spherical patterns in the first place.

Performance wise, images with a higher resolution already slow down rendering. For animation purposes where the observer is more interested in studying the dynamics of rotation (e.g. the bouncing ball with frictional contact), simple patterns should be sufficient. This is my primary interest. Maybe assembling a sphere from graphic primitives (coloured polyhedrons or spherical segments) is the better way for such applications.

I am still looking for suitable patterns and/or simple ways to generate and test them (before animating a bouncing earth with the image option ;-)).

Thanks

@acer 

To make it work in newer versions of Maple (I tried 2023)

"/data/tree.jpg"

has to be changed to

"/data/images/tree.jpg"

The original post is great!

@nm 

It did not. Thanks anyway. (The filter site: will be helpfull for other searches in the future)

@epostma 

I see the complication but as you might have guessed I was more interested in options to do the opposite of simplify (i.e. expansion of compound units). 

Thank you for the clarification and also for the module expand_units().

First 34 35 36 37 38 39 40 Last Page 36 of 67