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.

  • $\begingroup$ Pardon me, but what is a "mother line" in this context? $\endgroup$
    – Mr.Wizard
    Jan 26 '14 at 8:28
  • 1
    $\begingroup$ @xzczd okay, so what is a generatrix? The usual resources come up empty. $\endgroup$
    – Mr.Wizard
    Jan 26 '14 at 9:31
  • 1
    $\begingroup$ @Mr.Wizard Well, I didn't expect it's so hard to find a detailed explanation for this word……Dictionaries (for example, this: thefreedictionary.com/generatrix) do include it though. This word can be found in the wiki page of cone. $\endgroup$
    – xzczd
    Jan 26 '14 at 9:51
  • 1
    $\begingroup$ 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. $\endgroup$
    – Kuba
    Jan 26 '14 at 10:03
  • 1
    $\begingroup$ @xzczd Ha! "Learning Chinese by induction" :) $\endgroup$ 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>>}
  • $\begingroup$ nice! I think this is what I need, thanks. $\endgroup$
    – SEuser2013
    Jan 26 '14 at 10:19
  • $\begingroup$ But I should check the order of the lines. Let me see. $\endgroup$
    – SEuser2013
    Jan 26 '14 at 10:21
  • $\begingroup$ 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). $\endgroup$
    – SEuser2013
    Jan 26 '14 at 10:24
  • $\begingroup$ @SEuser2013 p.s it is boundary line so just add BoundaryStyle->None to g2. $\endgroup$
    – Kuba
    Jan 26 '14 at 10:27
  • $\begingroup$ 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}] $\endgroup$
    – SEuser2013
    Jan 26 '14 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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