Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ParametricPlot3D vs Reduce

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124077] Re: ParametricPlot3D vs Reduce
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Sun, 8 Jan 2012 04:23:28 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201201071020.FAA19453@smc.vnet.net> <CAEtRDSeP8hsK+kbL2su1UG2+TfnnV2BjAYnEQxgzUy+wCRQuvg@mail.gmail.com>

Well, I certianly did not mean to plot the region in the space with 
coordinates {b,d,z} where the conditions are satisfied; what I wanted to 
do was precisely what my code does: plot the part of the surface given 
by these three parametric equations (rats) that lies inside the unit 
cube. One way to do it is, as I pointed out in my second post:

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 reason why ParametricPlot3D[rats, {b, -10, 10}, {d, -10, 10},PlotRange->{{-1,1},{-1,1},{-1,1}}, AxesLabel -> {"a", "b", "c"}] shows some polygons was explained correctly by Heike Gramberg and Szabolcs Horvt; it is an artifact caused by the combination of three things:

1. The singularities of the parametric equations at b=0 and d=0.
2. The fact that Mathematica's plot functions by default connect points and regions on opposite sides of a singularity
3. The fact that restricting PlotRange caused ParametricPlot3D to construct a plot over a wider range than the one specified by PlotRange.

The combination of these three factors leads to the appearance of these spurious polygons. Once solution, as pointed out by both Heike and Szabolcs, is the use the Exclusions option but for my purpose RegionFunction is more suitable.

Andrzej

On 7 Jan 2012, at 18:25, Bob Hanlon wrote:

> 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)};
>
> ParametricPlot3D does not plot the intersection of {fx, fy, fz}. For
> the intersection use
>
> Plot3D[1, {b, -10, 10}, {d, -10, 10},
> RegionFunction ->
>  Function[{b, d, z}, And @@ Thread[-1 <= rats <= 1]]]
>
> RegionPlot[And @@ Thread[-1 <= rats <= 1],
> {b, -10, 10}, {d, -10, 10}]
>
> As expected, the results are empty. However, applying only two of the conditions
>
> Plot3D[1, {b, -10, 10}, {d, -10, 10},
>   RegionFunction ->
>
>    Function[{b, d, z}, And @@ Thread[-1 <= Drop[rats, #] <= 1]]] & /@
> Range[3]
>
> RegionPlot[And @@ Thread[-1 <= Drop[rats, #] <= 1],
>   {b, -10, 10}, {d, -10, 10}] & /@ Range[3]
>
>
> Bob Hanlon
>
> On Sat, Jan 7, 2012 at 5:20 AM, Andrzej Kozlowski <akozlowski at gmail.com> 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
>>
>>
>>
>
>
>
> --
> Bob Hanlon




  • Prev by Date: Re: ListPolarPlot questions
  • Next by Date: Re: MatrixPower problem
  • Previous by thread: Re: ParametricPlot3D vs Reduce
  • Next by thread: Re: ParametricPlot3D vs Reduce