3
$\begingroup$

I'm looking at the winning one-liners of 2014, this one inparticular:

s = WolframAlpha["bat ineqalty", "Result"]@2; RegionPlot3D[ N[s[x, y] && s[x, z] && s[y, z]], {x, -14, 14}, {y, -8, 8}, {z, -8, 8}, PlotPoints -> 90] 

It seems the x,y, and y intervals were chose by hand. I would like to know how I can make Mathematica choose the plot range automatically - any reasonable bounding box would be nice.

$\endgroup$

    1 Answer 1

    2
    $\begingroup$

    I think the range of plotting could be determined by using MaxValue and MinValue:

    s = WolframAlpha["bat ineqalty", "Result"]@2; range0 = Outer[#1[{#2, s[x, y]}, {x, y}] &, {MaxValue, MinValue}, {x, y}]; range = Through[{Min, Max}@range0]; RegionPlot3D[s[x, y] && s[x, z] && s[y, z], {x, ##}, {y, ##}, {z, ##}, PlotPoints -> 90, Mesh -> False] & @@ range 

    regionplot3D of bat

    It should be noted that in version 10.1 the following code is available:

    s = WolframAlpha["bat ineqalty", "Result"]@2; range0=RegionBounds[ImplicitRegion[s[x, y], {x, y}]]; range=MinMax[range0]; RegionPlot3D[s[x, y] && s[x, z] && s[y, z], {x, ##}, {y, ##}, {z, ##}, PlotPoints -> 90, Mesh -> False] & @@ range 
    $\endgroup$
    5
    • 1
      $\begingroup$In v10.1 you can use the function MinMax :) BTW, I noticed something interesting. In v8.0.4 WolframAlpha["bat ineqalty", "Result"] only returns an inequality, not a pure function!$\endgroup$
      – xzczd
      CommentedApr 11, 2015 at 7:31
    • $\begingroup$@xzczd Thank you,xzcyr.$\endgroup$
      – WateSoyan
      CommentedApr 11, 2015 at 7:42
    • $\begingroup$You're welcome, qsraaaa520.$\endgroup$
      – xzczd
      CommentedApr 11, 2015 at 7:58
    • $\begingroup$@xzczd Could you upvote my question?I am wating for any answers.mathematica.stackexchange.com/questions/79572/…$\endgroup$
      – WateSoyan
      CommentedApr 11, 2015 at 8:47
    • $\begingroup$I've already upvoted it. BTW there is no definite relationship between upvotes and being answered.$\endgroup$
      – xzczd
      CommentedApr 11, 2015 at 9:36

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.