2
$\begingroup$

I need to plot a function in implicit form as below:

ContourPlot3D[{73.04 z*y^2 - 293.04 z*x^2 == 
   2605.68 y^2 - 2605.68 x^2}, {x, 0, 3}, {y, 0, 6}, {z, 0, 15}]

but with the constraint x > y. How can I do this with Mathematica?

$\endgroup$
  • 2
    $\begingroup$ How about ContourPlot3D[{73.04 z*y^2 - 293.04 z*x^2 == 2605.68 y^2 - 2605.68 x^2}, {x, 0, 3}, {y, 0, 6}, {z, 0, 15}, RegionFunction -> Function[{x, y, z}, x > y]] ? $\endgroup$ – Nasser Jun 14 '14 at 7:22
  • $\begingroup$ @m_goldberg thank you for kindly editing my post again! :) $\endgroup$ – LCFactorization Jun 14 '14 at 7:51
  • $\begingroup$ @Nasser: Just saw your comment (we must have been typing concurrently) - learned a new one - do you know if it's always the case you can truncate the supplied arguments from a given plot to your RegionFunction? (I've not tested this). That is, for CP3D, MM supplies 4 arguments to the function (I was surprised it "matched" a function with only 3 as in your comment), so I'm guessing it wraps the RegionFunction specified in a way that some arguments become optional. Thoughts? $\endgroup$ – ciao Jun 14 '14 at 23:02
  • $\begingroup$ @rasher I just saw in help it used 3 arguments in the examples shown, and that is what I tried. !Mathematica graphics I did not know myself one can use 4 arguments like you did. $\endgroup$ – Nasser Jun 14 '14 at 23:08
  • $\begingroup$ @Nasser: Ah! Interesting! In the help for RegionFunction itself, it explicitly shows four for CP3D et al. $\endgroup$ – ciao Jun 14 '14 at 23:12
4
$\begingroup$

Take a look at RegionFunction, e.g.:

ContourPlot3D[{73.04 z*y^2 - 293.04 z*x^2 == 2605.68 y^2 - 2605.68 x^2}, 
              {x, 0, 10}, {y, 0, 20}, {z, 0, 15}, 
              RegionFunction -> Function[{x, y, z, f}, x > y]]
| improve this answer | |
$\endgroup$
  • $\begingroup$ thank you very much! this also works! $\endgroup$ – LCFactorization Jun 14 '14 at 7:26

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.