2
$\begingroup$

I am trying the example from this demonstration, but it is not working properly.

plane = ParametricPlot3D[{u, v, -2}, {u, -7, 7}, {v, -7, 7}, PlotPoints -> 200, MaxRecursion -> 2, Mesh -> None, Axes -> False, Boxed -> False]; Manipulate[ Show[plane, Lighting -> { {"Spot", RGBColor[1, 0, 0], {{0, r, 5}, {0, r, 0}}, Pi/8}, {"Spot", RGBColor[0, 1, 0], {{-r Sin[θ], r Cos[θ], 5}, {-r Sin[θ], r Cos[θ], 0}}, Pi/8}, {"Spot", RGBColor[0, 0, 1], {{r Sin[ϕ], r Cos[ϕ], 5}, {r Sin[ϕ], r Cos[ϕ], 0}}, Pi/8} }, PlotRange -> {(3 + r) {-1, 1}, (3 + r) {-1, 1}, Automatic}, ImageSize -> {350, 320}], {{r, 2, "spacing"}, 0, 3.5}, {{θ, 2 π/3, "green angle"}, π, 0}, {{ϕ, 2 π/3, "blue angle"}, π, 0}, "XYZ" -> {{RGB, {1, 1, 1}}, {0, 0, 0}, {1, 1, 1}}, SaveDefinitions -> True] 

It is not drawing any circles, only the plane.

Could you please suggest what is not right with my code?

Note 1: I am using 10.4 version of Mathematica, in 8.0 code works.

$\endgroup$
3
  • $\begingroup$ Yulia, you are missing a comma before the "XYZ" -> ...: if that's missing in your notebook as well, try fixing that and re-evaluating the code. $\endgroup$ Commented Jun 16, 2016 at 5:30
  • $\begingroup$ Originally, it was there. I have added it. $\endgroup$ Commented Jun 16, 2016 at 6:06
  • $\begingroup$ Question has been updated, it is not working in Mathematica 10.4. $\endgroup$ Commented Jun 16, 2016 at 10:42

1 Answer 1

3
$\begingroup$

Works with Mathematica 10.4.

Manipulate[ ParametricPlot3D[{u, v, -2}, {u, -7, 7}, {v, -7, 7}, PlotPoints -> 200, MaxRecursion -> 2, Mesh -> None, Axes -> False, Boxed -> False, PlotStyle -> {Black, Specularity[10]}, Lighting -> {{"Spot", RGBColor[RGB[[1]], 0, 0], {{0, r, 5}, {0, r, 0}}, Pi/8}, {"Spot", RGBColor[0, RGB[[2]], 0], {{-r Sin[theta], r Cos[theta], 5}, {-r Sin[theta], r Cos[theta], 0}}, Pi/8}, {"Spot", RGBColor[0, 0, RGB[[3]]], {{r Sin[phi], r Cos[phi], 5}, {r Sin[phi], r Cos[phi], 0}}, Pi/8}}], {{r, 2, "spacing"}, 0, 3.5}, {{theta, 2 Pi/3, "green angle"}, Pi, 0}, {{phi, 2 Pi/3, "blue angle"}, Pi, 0}, {{RGB, {1, 1, 1}}, {0, 0, 0}, {1, 1, 1}}] 

enter image description here

$\endgroup$
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.