8
$\begingroup$

What's the issue here?

The following code

f[x_, y_, t_] := {x Cos[t] - y Sin[t], x Sin[t] + y Cos[t]}
ContourPlot3D[f[x, y, t], {x, 0., 1}, {y, 0., 1}, {t, 0, Pi/2}]

generates this plot:

enter image description here

The code below, which supposedly should generate a similar result, instead generates:

ContourPlot3D[{x Cos[t] - y Sin[t], x Sin[t] + y Cos[t]}, {x, 0., 
  1}, {y, 0., 1}, {t, 0, Pi/2}]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ I'm counting 3 separate bugs in this behavior - filing reports now. For a workaround to get the right plot, omit the constant value (what is the ContourPlot3D of a constant value anyway?). f[x_, y_, t_] := {x Cos[t] - y Sin[t], x Sin[t] + y Cos[t]} ContourPlot3D[f[x, y, t], {x, 0., 1}, {y, 0., 1}, {t, 0, Pi/2}] looks much better. $\endgroup$ – Jason B. Mar 3 '17 at 15:19
  • $\begingroup$ @JasonB. What are the 3 bugs? $\endgroup$ – anderstood Mar 3 '17 at 15:43
  • $\begingroup$ It shouldn't matter if you give it a function that results in a list of expressions or if you give it a list of expressions. It shouldn't throw off the color if you add in the constant. The third one is subtler, but much worse. But maybe, in the end, it's just undocumented syntax $\endgroup$ – Jason B. Mar 3 '17 at 15:45
  • $\begingroup$ @JasonB. before we declare it a bug, can you clarify why the example above should work to begin with. According to the documentation, you have two options: either specify the value of a function (not the list with values), or specify an equality constraint. The examples in the OP are neither one nor the other. Shouldn't OP use ListContourPlot3D instead? $\endgroup$ – Stitch Mar 4 '17 at 0:18
  • $\begingroup$ @Stitch I think the main bug here is that ContouPlot3D gives a bad plot rather than an error message, since the syntax is wrong. But since it doesn't do that, it exposes other issues, which should be fixed. ListContourPlot3D isn't right either, since it wants an array of numbers, not a list of functions. It isn't entirely clear what OP wanted to get from this input. $\endgroup$ – Jason B. Mar 4 '17 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.