4
$\begingroup$

I have a set of points

pts = {{0.`, 3.2563310647907957`}, {1.1148148148148147`, 
4.23950315866573`}, {2.2296296296296294`, 
4.140162358470412`}, {3.3444444444444446`, 
4.00538956877346`}, {4.459259259259259`, 
0.6043122653889584`}, {5.5740740740740735`, 
0.3215124973296304`}, {6.688888888888889`, 
0.15878780480361337`}, {7.803703703703704`, 
0.17702871791741692`}, {8.918518518518518`, 
1.9691000091555526`}, {10.033333333333333`, 
3.1590899380474258`}, {11.148148148148147`, 
3.5733817560350354`}, {12.26296296296296`, 
2.9506973479415266`}, {13.377777777777778`, 
1.3527146214178898`}, {14.492592592592592`, 
1.2483870967741937`}, {15.607407407407408`, 
1.3054719687490461`}, {16.72222222222222`, 
1.0641407513657033`}, {17.837037037037035`, 
3.136124759666738`}, {18.951851851851853`, 
2.878914761803033`}, {20.066666666666666`, 
0.8222846156193732`}, {21.18148148148148`, 
0.7743858149967955`}, {22.296296296296294`, 
4.280709250160222`}, {23.41111111111111`, 
3.806970427564318`}, {24.52592592592592`, 
2.0106997894222842`}, {25.64074074074074`, 
0.736985381633961`}, {26.755555555555556`, 
0.49657277138584555`}, {27.87037037037037`, 
4.179006317331462`}, {28.985185185185184`, 
3.879934080019532`}, {30.099999999999998`, 2.3516342661824394`}};

then plot this points

ParametricPlot[BSplineFunction[pts][t], {t, 0, 1}]

enter image description here

I want to do something like this . I need to construct disk on each point, and it will like original graphic.

enter image description here

I tried first few steps:

 Show[Graphics3D[{Cylinder[{{0, 0, 0}, {1, 1, 0}}, 1], 
 Cylinder[{{1, 1, 0}, {2, 2, 0}}, 3], 
 Cylinder[{{2, 2, 0}, {3, 3, 0}}, 4]}], Boxed -> False]

enter image description here

$\endgroup$
3
$\begingroup$
int = Interpolation[pts, InterpolationOrder -> 0];

Plot[int[t], {t, 0, 30.1}]

enter image description here

dom = {t}~Join~int["Domain"][[1]]

{t, 0., 30.1}

RevolutionPlot3D[int[t], Evaluate @ dom, RevolutionAxis -> "X", 
 MeshFunctions -> {#1 &}, Mesh -> {pts[[;; , 1]]}, Boxed -> False, 
 Axes -> False, ViewPoint -> {0, -2, 0}, MaxRecursion -> 5]

enter image description here

$\endgroup$
  • 2
    $\begingroup$ MaxRecursion ->6 $\endgroup$ – vito Nov 18 '16 at 14:21
4
$\begingroup$

You can create cylinders directly from the points.

Graphics3D@
 Table[Cylinder[{{pts[[i, 1]], 0, 0}, {pts[[i + 1, 1]], 0, 0}}, 
   pts[[i, 2]]], {i, 1, Length@pts - 1}]

enter image description here

$\endgroup$

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.