Skip to main content
added 152 characters in body
Source Link
VLC
  • 9.9k
  • 1
  • 33
  • 62

This is an approach that uses the graphics primitive Line.

Needs["TetGenLink`"] twodPts = Transpose[{RandomReal[{-1, 1}, {10}], RandomReal[{-1, 1}, {10}], Table[-1, {10}]}]; threedPts = RandomReal[{-1, 1}, {50, 3}]; {pts, surface} = TetGenConvexHull[threedPts]; twoDptsPlot = Graphics3D[Line[twodPts], PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}]; threeDPtsPlot = ListPointPlot3D[threedPts, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}]; surfacePlot = Graphics3D[{EdgeForm[], Opacity[0.3], GraphicsComplex[pts, Polygon[surface]], GraphicsComplex[ptsPlotRange -> {{-1, Polygon[surface]]1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}}]; Show[threeDPtsPlot, surfacePlot, twoDptsPlot, ImageSize -> {200, 200}, BoxRatios -> 1, Axes -> False] 

enter image description hereenter image description here

This is an approach that uses the graphics primitive Line.

Needs["TetGenLink`"] twodPts = Transpose[{RandomReal[{-1, 1}, {10}], RandomReal[{-1, 1}, {10}], Table[-1, {10}]}]; threedPts = RandomReal[{-1, 1}, {50, 3}]; {pts, surface} = TetGenConvexHull[threedPts]; twoDptsPlot = Graphics3D[Line[twodPts], ImageSize -> {200, 200}]; threeDPtsPlot = ListPointPlot3D[threedPts, ImageSize -> {200, 200}]; surfacePlot = Graphics3D[{EdgeForm[], Opacity[0.3], GraphicsComplex[pts, Polygon[surface]], ImageSize -> {200, 200}}]; Show[threeDPtsPlot, surfacePlot, twoDptsPlot, ImageSize -> {200, 200}, BoxRatios -> 1, Axes -> False] 

enter image description here

This is an approach that uses the graphics primitive Line.

Needs["TetGenLink`"] twodPts = Transpose[{RandomReal[{-1, 1}, {10}], RandomReal[{-1, 1}, {10}], Table[-1, {10}]}]; threedPts = RandomReal[{-1, 1}, {50, 3}]; {pts, surface} = TetGenConvexHull[threedPts]; twoDptsPlot = Graphics3D[Line[twodPts], PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}]; threeDPtsPlot = ListPointPlot3D[threedPts, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}]; surfacePlot = Graphics3D[{EdgeForm[], Opacity[0.3], GraphicsComplex[pts, Polygon[surface]], PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, ImageSize -> {200, 200}}]; Show[threeDPtsPlot, surfacePlot, twoDptsPlot, ImageSize -> {200, 200}, BoxRatios -> 1, Axes -> False] 

enter image description here

Source Link
VLC
  • 9.9k
  • 1
  • 33
  • 62

This is an approach that uses the graphics primitive Line.

Needs["TetGenLink`"] twodPts = Transpose[{RandomReal[{-1, 1}, {10}], RandomReal[{-1, 1}, {10}], Table[-1, {10}]}]; threedPts = RandomReal[{-1, 1}, {50, 3}]; {pts, surface} = TetGenConvexHull[threedPts]; twoDptsPlot = Graphics3D[Line[twodPts], ImageSize -> {200, 200}]; threeDPtsPlot = ListPointPlot3D[threedPts, ImageSize -> {200, 200}]; surfacePlot = Graphics3D[{EdgeForm[], Opacity[0.3], GraphicsComplex[pts, Polygon[surface]], ImageSize -> {200, 200}}]; Show[threeDPtsPlot, surfacePlot, twoDptsPlot, ImageSize -> {200, 200}, BoxRatios -> 1, Axes -> False] 

enter image description here