Mathematica many objects - where are they?

  • Context: Mathematica 
  • Thread starter Thread starter andlook
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion centers on generating multiple 3D parametric plots in Mathematica using the ParametricPlot3D function. The initial attempt using the Do loop fails to produce visible output because Do does not return any value. The recommended solution is to utilize the Show function combined with Table to correctly display multiple objects on the same plot. The corrected code is: Show[Table[ParametricPlot3D[{Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]}, {u,0,2 Pi, Pi/n}, {v,0,Pi,Pi/n}, Axes->None, Boxed->False], {n,4,12,1}], PlotRange->All].

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of 3D parametric plotting concepts
  • Knowledge of the Show and Table functions in Mathematica
  • Basic understanding of plotting parameters such as Axes and Boxed options
NEXT STEPS
  • Explore advanced features of ParametricPlot3D in Mathematica
  • Learn about the Show function for combining multiple plots
  • Investigate the use of Table for generating sequences of plots
  • Study optimization techniques for rendering complex 3D graphics in Mathematica
USEFUL FOR

This discussion is beneficial for Mathematica users, particularly those interested in 3D graphics, educators demonstrating parametric equations, and developers creating visualizations for mathematical concepts.

andlook
Messages
32
Reaction score
0
So I want to draw a number of objects on the same picture. The object is defined parametrically:

ParametricPlot3D[{Cos Sin[v], Sin Sin[v], Cos[v]},
{u,0,2Pi,Pi/20},{v,0,Pi,Pi/12}, Axes->None, Boxed->False]

gives one object.

Then

Do[ParametricPlot3D[
{Cos Sin[v], Sin Sin[v], Cos[v]},
{u,0,2 Pi, Pi/n},{v,0,Pi,Pi/n}, Axes->None, Boxed->False],
{n,4,12,1}]


Should give multiple objects. But running this second code doesn't give any output. That is it runs for a second ie running in title box, finishes and I have no picture. The window looks same as before I ran it.

Any ideas why this is not displaying multiple objects?

Thanks
 
Physics news on Phys.org
I don't have access to verify right now, but I believe that Do has no output.
 
Yes, Do has no output. Use the following:

Show[Table[ParametricPlot3D[...], {n,4,12,1}], PlotRange->All]
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K