Re: ParametricPlot3D vs Reduce

• To: mathgroup at smc.vnet.net
• Subject: [mg124094] Re: ParametricPlot3D vs Reduce
• From: Szabolcs Horvát <szhorvat at gmail.com>
• Date: Sun, 8 Jan 2012 04:29:22 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <09D35683-89B2-4778-8552-0B7F44CF5A82@gmail.com> <je96o3\$j72\$1@smc.vnet.net>

```On 2012.01.07. 11:28, Andrzej Kozlowski wrote:
> On 6 Jan 2012, at 23:09, Andrzej Kozlowski wrote:
>
>> I just came across something somewhat baffling, though it could be the
> result of an imperfect understanding of how 3D graphic functions work.
> Consider the following three rational functions of two variables, which
> we will think of as parameters of a point on a surface in 3D.
>>
>> rats = {(-b - 2*d - b^3*d^2)/(b*d), (2*b + d + b^4*d +
>>       2*b^3*d^2)/(b^2*d), (-1 - 2*b^3*d - b^2*d^2)/(b^2*d)};
>>
>> Now, note that:
>>
>> Reduce[Thread[-1<= rats<= 1], {b, d}]
>>
>> False
>>
>> in other words, there are no values of the parameters b and d for
> which the point lies in the unit cube. However:
>>
>> ParametricPlot3D[rats, {b, -10, 10}, {d, -10, 10},
>> PlotRange ->  {{-1, 1}, {-1, 1}, {-1, 1}},
>> AxesLabel ->  {"a", "b", "c"}]
>>
>> There appear to be several polygons inside the unit cube that should
> not be there?
>>
>> Andrzej Kozlowski
>>
>>
>
> On the other hand this works fine:
>
> ParametricPlot3D[rats, {b, -10, 10}, {d, -10, 10},
>   RegionFunction ->
>    Function[{x, y, z, u,
>      v}, -1<= x<= 1&&  -1<= y<= 1&&  -1<= z<= 1],
>   AxesLabel ->  {"a", "b", "c"}]
>
> The surface becomes visible in a somewhat larger cube:
>
> ParametricPlot3D[rats, {b, -10, 10}, {d, -10, 10},
>   RegionFunction ->
>    Function[{x, y, z, u,
>      v}, -3<= x<= 3&&  -3<= y<= 3&&  -3<= z<= 3],
>   AxesLabel ->  {"a", "b", "c"}]
>
> So the polygons in the earlier picture (with PlotRange restricted to the
> unit cube) must be due to some artifact of the way ParametricPlot3D
> displays a surface. Possibly a bug?
>

I missed this message when I replied to the original one.

My understanding is that when you use a RegionFunction, all points
outside the region will be discarded before generating the 3D object for
the graphic.

When you use PlotRange, these points are kept when constructing the 3D
object, but the object is later clipped to the PlotRange before being
rendered.

It appears a workaround could be to specify a very large, but not
infinite plot region:

RegionFunction -> Function[{x, y, z}, x^2 + y^2 + z^2 < 1000]

The points outside this very large region could still contribute to some
parts of the graphic close to the origin, so you'll get a much more
beautiful plot if you do a "clean cut" using Exclusions.

I forgot to mention in my previous reply I reduce the (b,d) ranges to
(-1,1).  Please change them back to (-10,10) to get the full plot.

--
Szabolcs Horvát
Mma QA site proposal: http://area51.stackexchange.com/proposals/37304

```

• Prev by Date: Re: ParametricPlot3D vs Reduce
• Next by Date: Re: FindFit for the 4-parameter beta distribution
• Previous by thread: Re: ParametricPlot3D vs Reduce
• Next by thread: Column widths in Grid