C_R

1995 Reputation

19 Badges

4 years, 204 days

MaplePrimes Activity


These are replies submitted by C_R

@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().

I fully agree.

I struggle with advanced search and with narrowing searches (e.g. combining users and keywords).

I also miss an ordering option for searches (most recent at the top for example).

Linking to other resources is a good idea too.

(I have changed this into a post if you do not mind. Thumbs seem not to be transfered. I hope this doesn't downplay the importance of your post)

I assume that your obersation was made on the same computer in 2D Math and that this computer did not undergo any major changes (OS upgrade, graphic card changes, ...).

Some questions:

Do see the character change in Maple input and output?

Do you use default font settings?

What operating system do you run?

Did the computer run for a longer period of time without restart?

What happens to the changed characters if your save the worksheet and reopen the saved document? Same question with the condition that all Mapel instances have been closed (i.e. exit Maple)?

Do you have screenshots?

@dharr 

This is exactly what I had in mind when I wrote my suggestions on transfer functions with units. As it turns out this simplification is relevant each time an unassigned  name is combined with compound units in a product. With this in mind I will suggest that Maplesoft takes a simplification functionality into consideration.

Thank you for your time. It was a real joy to see your original code evolve into a simple and elegant statement.

@dharr 

Beautiful!

This piece of code should be part of Maples unit documentation to provide a solution for (rare?) cases where simplify does not simplify Unit expressions with compound units.

A real alternative to my original suggestion for a dedicated command without any coding effort for Maplesoft.

Thank you again

(I use units wherever possible. It's worth a try, with the caveat that you may feel less confident after a while if you have to work without)

 

dharr has provided an alternative for C1 here

subsindets(expr, specfunc(Units:-Unit), x -> subsindets(op(x), name, Unit))

where expr is an expression with Unit expressions with compound units.

@acer 

The original question was about a way to expand unit expressions. I finally got a solution for that (sorry for being persistent). The follow-up question was more about converting a procedure to a compact inline statement (not necessarily a proc construct). My attempts on converting the original procedure have been miserable. Major hurdles where the dismantling of expressions and the if statement. dharr’s solution uses different techniques to avoid all this.

In case I am more interested in techniques or alternative ways, I will try to make this clearer and/or pic another example to avoid duplicate impression.

@dharr 

Excellent! This does exactly what I was looking. The identifier "name" seems to be key for compact inline code. I found a variant that also works in 2D with the arrow operator. 

subsindets(ex, specfunc(Units:-Unit), x -> subsindets(op(x), name, y -> Unit(y)))

Thank you for following up here. My original post was deleted as spam according to notice from Maplesoft Member Services. Strange

@specter123 

evalc is missing for the big expression

4 5 6 7 8 9 10 Last Page 6 of 37