Mathematica Mathematica many objects - where are they?

  • Thread starter Thread starter andlook
  • Start date Start date
  • Tags Tags
    Mathematica
AI Thread Summary
The discussion centers on the issue of displaying multiple parametric objects in a 3D plot using Mathematica. The initial code successfully generates a single object using ParametricPlot3D. However, the attempt to create multiple objects with a Do loop fails to produce any visible output, as Do does not return a value. The solution provided suggests using the Show function combined with Table to properly generate and display multiple objects in one plot. This approach ensures that all generated plots are combined and visible within the specified plot range.
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
Views
3K
Replies
1
Views
2K
Replies
2
Views
1K
Replies
4
Views
3K
Replies
1
Views
2K
Replies
2
Views
3K
Replies
9
Views
3K
Replies
8
Views
3K
Back
Top