Re: PolygonIntersections, MeshRange: What do they do?
- To: mathgroup at smc.vnet.net
- Subject: [mg20653] Re: PolygonIntersections, MeshRange: What do they do?
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sun, 7 Nov 1999 02:09:56 -0500
- References: <7vrcg0$2nq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ted,
MeshRange:
MeshRange is used for array-based graphics like SurfaceGraphics and
ContourGraphics to specify the x and y ranges.
With the following the default ranges are derived from the arraydimensions
Show[SurfaceGraphics[{{1, 3, 4}, {2, 6, 1}, {4, 1, 7}, {5, 2, 4}}],
Axes -> True]
We can specify what we want with MeshRange:
Show[%, MeshRange -> {{-9, -5}, {4, 9}}]
If we plot with, for example,
Plot3D[x+y, {x,-9, -5}, {y, 4,9}]
then MeshRange -> {{-9, -5}, {4, 9}}] is automatically included in the
SurfaceGraphics object generated.
We can't mess things up Plot3D because MeshRange is not an option for it.
PolygonIntersections:
I must just take the book's statement that "PolygonIntersections -> False is
useful in creating graphics objects which can be sent to certain external
three dimensional rendering programs"
Perhaps someone else will enlarge on this, but here are some experiments:
gr = Show[Graphics3D[{Polygon[{{0, 0, 0}, {1, 1, 1}, {0, 1, 1}}],
Polygon[{{0, 1, 1}, {0, 0, 1}, {1, 1, 0}}]}]]
InputForm[gr]
gr2 = Show[gr, PolygonIntersections -> False]
Why not shown above?
When we get the following
Show[gr2]
Looking at the input form we see that we have
- the polygons have been split along the line of intersecton,
- the colors are given explicitly using face form
- polygon edges are suppresed with EdgeForm[]
- - and are provided by explicit Line objects
InputForm[gr2]
We can show the splitting visually and see that the colour is not dependent
on lighting
Show[DeleteCases[gr2, _EdgeForm | _Line, Infinity],
Lighting -> False]
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
Ersek, Ted R <ErsekTR at navair.navy.mil> wrote in message
news:7vrcg0$2nq at smc.vnet.net...
>
> When would I want to use the options below? I checked the documentation
and
> I still don't understand.
>
> In[1]:=
> Options[Graphics3D, PolygonIntersections]
>
> Out[1]=
> {PolygonIntersections -> True}
>
> -------------------
>
> In[2]:=
> Options[SurfaceGraphics, MeshRange]
>
> Out[2]=
> {MeshRange -> Automatic}
>
> --------------------
> Regards,
> Ted Ersek
>
> For Mathematica tips, tricks see
> http://www.dot.net.au/~elisha/ersek/Tricks.html
>
>
>