1
$\begingroup$

I have a manipulate

Manipulate[
 Show[{
   Graphics3D[{Red, Cylinder[{{0, 0, 0}, {0, 0, h1}}, r1], 
   Green, Pyramid[{{r2, -r2, h1 + 0.01}, {-r2, -r2, h1 + 0.01}, {-r2, r2, 
        h1 + 0.01}, {r2, r2, h1 + 0.01}, {0, 0, h2 + h1}}]
     }, PlotRange -> {{-5, 5}, {-5, 5}, {0, 20}},
    Boxed -> True, ImageSize -> {300, 300}, 
    ClipPlanes -> {i, j, 1, -k + 0.01}], 
   ContourPlot3D[
    i x + j y + z == k, {x, -5, 5}, {y, -5, 5}, {z, 0, 20.01}, 
    Mesh -> None, ContourStyle -> Directive[Blue, Opacity[0.3]]]}],
 "Cylinder",
 {{h1, 5, "H"}, 2, 10, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 {{r1, 3, "R"}, 2, 5, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 "", "Pyramid",
 {{h2, 5, "H"}, 2, 10, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 {{r2, 3, "R"}, 2, 5, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 "", "Plane",
 {{i, 0, "X"}, 0, 2, .01, ImageSize -> Small, Appearance -> "Labeled"},
 {{j, 0, "Y"}, 0, 2, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 {{k, 0, "Z"}, 0, 20, .01, ImageSize -> Small,   Appearance -> "Labeled"},
 ControlPlacement -> Left]

How can I get List of points (click by button), which now set in the Manipulate

$\endgroup$
  • 1
    $\begingroup$ What exactly do you mean by "get"? Store it in a variable, print it? $\endgroup$ – anderstood Mar 24 '18 at 12:27
  • $\begingroup$ @anderstood Store it in a variable $\endgroup$ – Andrew Mar 24 '18 at 13:01
2
$\begingroup$

Probably the simplest thing to do is to save the variables into a list. For example, change the first two lines to

Manipulate[saveState = {h1, r1, h2, r2, i, j, k}; Show[{...

now you can run the Manipulate, adjust the sliders. When done, go to a new cell and recall the positions of the slider-variables by examining the list

saveState
| improve this answer | |
$\endgroup$
  • $\begingroup$ This works, thank you $\endgroup$ – Andrew Mar 24 '18 at 14:29

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.