cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

21-Topaz II

How to plot countless spheres?

Hi everyone,
I am trying to represent on a 3D plot, spheres placed neatly one with respect to the other, as seen in the following picture.

The problem arises when the argument of the plot consists of countless elementary functions.

Is there a synthetic way to represent multiple functions so you do not have to write an endless list in the plot argument as shown below?

Thank you very much

Franc

ACCEPTED SOLUTION

Accepted Solutions
25-Diamond I
(To:-MFra-)

I would guess that this will be easier to achieve in Prime as Primes 3D plot accepts NaNs (to separate the data of the various speheres) which Mathcad unfortunately does not. But as we know Prime is rather useless when it comes to plotting, especially 3D plots as its capabilities are beneath contempt.

I gave it a try in Mathcad and was surprised that it worked:

Now you would only use just one plot argument for each color:

10 REPLIES 10
17-Peridot
(To:-MFra-)

Something like the attached?  ("countless" would be an exaggeration though!):

Alan

21-Topaz II
(To:AlanStevens)

Hi Alan,

Without editing the program, but simply by modifying some 3D graphic properties (eg perspective and enabling fog) the graph becomes unacceptable as you can see below:

25-Diamond I
(To:-MFra-)

You won't be happy with my "solution", too.

After saving and reopening the worksheet I see this

and this

I had not changed anything in the sheet - not sure whats going on. By this I mean I don't understand why it worked in the first place. I would have expected what I see now as all the combined spheres are represented but just one contiguous data mesh - they have to be konnected. But I wrote already in my answer before that I was surprised that it worked - obvioiusly for good reason.

Adding a row of NaN*s between the data of the single speheres did not help as the 3Dplot component would refuse plotting with the usual "non-scalar value" error.

😞

21-Topaz II
(To:Werner_E)

it's all OK! I wrote cos (φ) instead of cos (θ).

25-Diamond I
(To:-MFra-)

@F.M. wrote:

it's all OK!

Really!? I am surprised. Have you already tried saving the sheet, closing Mathcad and then relaoding it?

I wrote cos (φ) instead of cos (θ).

If thats all you changed then you get no sphere!

It should be

21-Topaz II
(To:Werner_E)

It is all OK! Look :

25-Diamond I
(To:-MFra-)

Yes, thats what I understood from your first post. But if you do just this change, we don'tr get spheres anymore

I see that handling of the pics is even more cumbersome. Not only that we cannot copy and paste from the clipboard, there is no way to look at a picture in its full size/resolution. When we click on the pic a window opens to show it scaled down and there is no way to see it in its original state other than downloading it. What a crap!

P.S.: I see you are using the first version of my screenshot where some limits in Createmesh were wrong.

17-Peridot
(To:-MFra-)

@F.M. wrote:

Hi Alan,

Without editing the program, but simply by modifying some 3D graphic properties (eg perspective and enabling fog) the graph becomes unacceptable as you can see below:

Yes. You have to choose the properties carefully to get the desired look. All the spheres are really just part of a large single matrix and hence are actually interconnected. M15 doesn't allow for NaNs to be used in 3D plots to allow for disconnects between the spheres.

Alan

25-Diamond I
(To:-MFra-)

I would guess that this will be easier to achieve in Prime as Primes 3D plot accepts NaNs (to separate the data of the various speheres) which Mathcad unfortunately does not. But as we know Prime is rather useless when it comes to plotting, especially 3D plots as its capabilities are beneath contempt.

I gave it a try in Mathcad and was surprised that it worked:

Now you would only use just one plot argument for each color:

25-Diamond I
(To:-MFra-)

For whatever it may be woth here is a version for Prime.

I am throwing in a row of NaN's between the various spheres and in Prime that works. Some small modifactions were necessary as the data format created by "CreateMesh" is less nested in Prime than in Mathcad.

Unfortunately the overall plot qualitiy is .....

File in P30 format attached

Announcements

Top Tags