Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a plot

g = RevolutionPlot3D[{Sin[t], t}, {t, 0, π}, {θ, -π, π + 3 π/4}];

Is it possible to extract the generatrices (generating curves) from g?

Sometimes, I want to concentrate on plotting the surface in different ways, and what I need is the all the generating curves. Can I obtain these curves from g?.

For example, this is what I need (the data could be plot by Line /@ curves and could be exported elsewhere).

curves = Table[RotationMatrix[θ, {0, 0, 1}]. {Sin[t], 0, t}, {θ, 0, 2π, .3}, {t, 0, π, .3}];

The example result, curves, is what I want, but I obtain that by re-think about generating method and {Sin[t], 0, t}. Seems defining g was a waste of time.

But in the plot of g, such lines/meshes are really shown by Mathematica, so I would like to extract them.

share|improve this question
Pardon me, but what is a "mother line" in this context? – Mr.Wizard Jan 26 '14 at 8:28
@xzczd okay, so what is a generatrix? The usual resources come up empty. – Mr.Wizard Jan 26 '14 at 9:31
@Mr.Wizard Well, I didn't expect it's so hard to find a detailed explanation for this word……Dictionaries (for example, this: do include it though. This word can be found in the wiki page of cone. – xzczd Jan 26 '14 at 9:51
Imo OP wants to extract mesh, especially vertical part, which is {Sin[z],0,0} But the latter explanation about generating different surfaces is not clear to me. – Kuba Jan 26 '14 at 10:03
@xzczd Ha! "Learning Chinese by induction" :) – Dr. belisarius Jan 26 '14 at 10:25

You can see them with:

g2 = RevolutionPlot3D[{Sin[t], t}, {t, 0, π}, {θ, -π, π + 3 π/4}, 
                       PlotStyle -> None, Mesh -> {0, 10}, BoundaryStyle -> None]

enter image description here

And since you want coordinates aswell, then:

Cases[ Normal@g2, _Line, \[Infinity]]
{Line[{<<185>>}], Line[{<<85>>}], Line[{<<85>>}], Line[{<<85>>}], 
 Line[{<<85>>}], Line[{<<73>>}], Line[{<<73>>}], Line[{<<73>>}], 
 Line[{<<73>>}], Line[{<<73>>}], <<1>>}
share|improve this answer
nice! I think this is what I need, thanks. – SEuser2013 Jan 26 '14 at 10:19
But I should check the order of the lines. Let me see. – SEuser2013 Jan 26 '14 at 10:21
Cases[Normal@g2, _Line, \[Infinity]] do you know the sort method used in this result, I found one thing is that Cases[Normal@g2, _Line, \[Infinity]][[1]] looks like two lines(joined). – SEuser2013 Jan 26 '14 at 10:24
@SEuser2013 p.s it is boundary line so just add BoundaryStyle->None to g2. – Kuba Jan 26 '14 at 10:27
well, Let's set mesh->{0,100}. can we let this rotate smoothly from [0,2Pi]· Manipulate[Graphics3D[Cases[Normal@g2,_Line,\[Infinity]][[x]],PlotRange->5],{x,‌​1,100,1}] – SEuser2013 Jan 26 '14 at 10:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.