# Extracting x,y,z points from ParametricPlot3D

I would like to know if there is a way to extract x,y,z points from ParametricPlot3D.

>

ParametricPlot3D[{a1, b1, c1, d1, f1, g1, h1, i1, j1}, {t, 3, 4}, {w, 0, 2 [Pi]}, Axes -> True, AxesStyle -> {Red, Green, Blue},
AxesStyle -> {Red, Green, Blue}, PlotStyle -> {Red, LightPink}, Mesh -> None]

ParametricPlot3D[{a1, b1, c1, d1, f1, g1, h1, i1, j1}, {t, 3, 4}, {w, 0, 2 [Pi]}, Axes -> False, Boxed -> False, PlotStyle -> {Red, LightPink}, Mesh -> None]

• Welcome to Mathematica.SE, NurFadhilah! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Apr 23, 2019 at 9:30

We have, for example:

plot1 = ParametricPlot3D[{Cos[u], Sin[u] + Cos[v], Sin[v]}, {u, 0, 2 \[Pi]}, {v, -\[Pi], \[Pi]}]


Then we can extract the points using the following:

pts=Flatten[Cases[plot1, _GraphicsComplex , Infinity][[;; , 1]], 1]


We can then superimpose them on an already existing plot:

Show[plot1, Graphics3D[Point[pts]]]


Or we can save them as a .txt document, in the form of a table:

Export["data.txt", pts, "Table"]


To access them in Mathematica, you can simply do, for instance:

pts[[1]]


{1., -1., -4.48799*10^-7}

I hope this helps.

• More directly you can get the points with plot1[[1,1]] Apr 23, 2019 at 10:33
• This is outstanding helpful. It also works for FeatureSpacePlot3D and DimensionReduce. Apr 19, 2021 at 2:14