3
$\begingroup$

I've got this data, which if I plot with ListPointPlot, looks like this:

Using ListPointPlot

Using ListPlot3D

I just want to make a cone through those points, a simple cone like thing which is empty on the inside. I'm very very new to Mathematica so please be a little detailed in your answer...

Edit: the data can be imported from pastebin via

`Get["http://pastebin.com/raw/6VGiR4dc"]`

Somebody put my question on hold because it was incomplete in terms of the data but now the data has been provided.

Unfortunately, the excellent suggestion by ubpdqn to increase the MaxPlotPoints doesn't work for this data.

$\endgroup$
14
  • $\begingroup$ Perhaps something simple like ListSurfacePlot3D[pts] or ConvexHullMesh[pts] will give you what you need? $\endgroup$
    – flip
    Dec 8, 2016 at 1:34
  • 4
    $\begingroup$ What you are asking isn't simple. Though we can clearly see that these points describe a 2D surface embedded in 3D, how do you find that programmatically. ListSurfacePlot3D may be the answer, but I think you will have the best results if you make the data available for testing. If you go to pastebin.com you can paste the data there and put the link here. $\endgroup$
    – Jason B.
    Dec 8, 2016 at 2:02
  • $\begingroup$ Thanks a Lot for your answers, but still getting no proper surface, tried maxpoints thing............Here's my data...I still can't get a proper surface.... pastebin.com/6VGiR4dc $\endgroup$ Dec 8, 2016 at 23:45
  • $\begingroup$ You are right, using MaxPlotPoints just make it that much worse: pts = Get["http://pastebin.com/raw/6VGiR4dc"]; ListSurfacePlot3D[pts, MaxPlotPoints -> #] & /@ {10, 20, 50, 60, 100, 200} $\endgroup$
    – Jason B.
    Dec 8, 2016 at 23:52
  • $\begingroup$ so is there anything that can be done?? $\endgroup$ Dec 9, 2016 at 0:31

2 Answers 2

9
$\begingroup$

Just to put some "flesh" in the absence of provision of data. ListSurfacePlot3D can deal with relatively smooth data but may need MaxPlotPoints option to get a reasonable result as seen in this toy example:

fun[u_, v_] := {Cos[v] Sech[u], u - Tanh[u], Sech[u] Sin[v]}
tab = Catenate@Table[fun[u, v], {u, 0, 2, 0.1}, {v, 0, 2 Pi, 0.1}];
p = ParametricPlot3D[f[u, v], {u, 0, 2}, {v, 0, 2 Pi}, BoxRatios -> 1,
    Mesh -> None];
p3 = ListPointPlot3D[tab, BoxRatios -> 1];
sp = ListSurfacePlot3D[tab, Mesh -> None, BoxRatios -> 1];
spm = ListSurfacePlot3D[tab, Mesh -> None, BoxRatios -> 1, 
   MaxPlotPoints -> 50];
Grid[{{"Plot3D", "ListPointPlot3D", "ListSurfacePlot3D", 
   "ListSurfacePlot3D with MaxPLotPoints->50"}, {p, p3, sp, spm}}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks a Lot for your answers, but still getting no proper surface, tried maxpoints thing............Here's my data...I still can't get a proper surface.... pastebin.com/6VGiR4dc $\endgroup$ Dec 8, 2016 at 23:45
2
$\begingroup$

(from my comment/deleted answer :)

You could also use ConvexHullMesh Ala-

pts = Get["http://pastebin.com/raw/6VGiR4dc"];
Show[ConvexHullMesh[pts, PlotTheme -> "Minimal"], Axes -> True, Boxed -> True]

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ If you want to remove the flat part, to get the cone shape, then it's fairly easy to do in this case. Just remove any polygons whose normal vector is parallel to the largest polygon's normal vector. pastebin.com/raw/RNaQ0SCF $\endgroup$
    – Jason B.
    Dec 9, 2016 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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