[Date Index]
[Thread Index]
[Author Index]
Re: Graphics Directives Lost In Certain Cases
*To*: mathgroup at smc.vnet.net
*Subject*: [mg25652] Re: Graphics Directives Lost In Certain Cases
*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
*Date*: Wed, 18 Oct 2000 02:52:25 -0400 (EDT)
*Organization*: Universitaet Leipzig
*References*: <8seamo$6rm@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Hi,
I'm not sure but you may try
Show[Graphics3D[{{Line[{{0, 0, 0}, {10, 10, 10}}]}, RGBColor[0, 0, 1],
AbsoluteThickness[
2], {Line[{{0, 0, 0}, {10, 10, 10}/
2}], {Polygon[{{5., 5., 5.}, {4., 4.306186217847897,
3.6938137821521027}, {3.6938137821521027, 4.,
4.306186217847897}}]}}}], AspectRatio -> Automatic,
PlotRange -> All, Lighting -> False];
^^^^^^^^^^^^^^^^^
to see at least a blue polygon. The point is, that the lighting
calculation
super seeds the other color calculations.
I think there is some inconsitency in Mathematica regarding colors and
surface
colors. In a 3d graphic I would expect, that any color is a surface
color, but
lines and points have no normal vector to calculate the shading.
You see the inconsistence when yoy are using Plot3D[] with a color. The
graphics
ParametricPlot3D[{x, y, x^2 + y^2, Hue[(x^2 + y^2)/4]}, {x, -2, 2}, {y,
-2,
2}]
is colored but
ParametricPlot3D[{x, y, x^2 + y^2, Hue[(x^2 + y^2)/4]}, {x, -2, 2}, {y,
-2,
2}]
not and
ParametricPlot3D[{x, y, x^2 + y^2, Hue[(x^2 + y^2)/4]}, {x, -2, 2}, {y,
-2,
2}, Lighting -> False]
is again with colors, but a bit different from
ParametricPlot3D[{x, y, x^2 + y^2, SurfaceColor[Hue[(x^2 + y^2)/8]]},
{x, -2,
2}, {y, -2, 2}]
So -- always when a lighting calculation is done -- the colors are
dropped.
Hope that helps
Jens
David Park wrote:
>
> Dear MathGroup,
>
> I have come across a strange behavior of 3D graphics where graphics
> directives are lost in certain cases. It has to do with a 3D arrow routine I
> am working on, but here is the bare bones essence of the problem.
>
> The following plot gives a second thick blue line plotted on top half of the
> first thin black line.
>
> Show[Graphics3D[
> {{Line[{{0, 0, 0}, {10, 10, 10}}]},
> RGBColor[0, 0, 1],
> AbsoluteThickness[2], {Line[{{0, 0, 0}, {10, 10, 10}/2}]}}],
> AspectRatio -> Automatic, PlotRange -> All];
>
> If I combine the second line with this polygon, the color and thickness
> directives are lost. Why?
>
> Show[Graphics3D[{{Line[{{0, 0, 0}, {10, 10, 10}}]}, RGBColor[0, 0, 1],
> AbsoluteThickness[2], {Line[{{0, 0, 0}, {10, 10, 10}/2}],
> {Polygon[{{5., 5., 5.}, {4., 4.306186217847897, 3.6938137821521027},
> {3.6938137821521027, 4., 4.306186217847897}}]}}}],
> AspectRatio -> Automatic, PlotRange -> All];
>
> But the directives are not lost if the second line is not right on top of
> the first line.
>
> Show[Graphics3D[{{Line[{{0, 0, 0}, {10, 10, 10}}]}, RGBColor[0, 0, 1],
> AbsoluteThickness[2], {Line[{{0, 0, 0}, {10, 10, 10.000001}/2}],
> {Polygon[{{5., 5., 5.}, {4., 4.306186217847897, 3.6938137821521027},
> {3.6938137821521027, 4., 4.306186217847897}}]}}}],
> AspectRatio -> Automatic, PlotRange -> All];
>
> Nor are the directives lost if a different polygon is used.
>
> Show[Graphics3D[{{Line[{{0, 0, 0}, {10, 10, 10}}]}, RGBColor[0, 0, 1],
> AbsoluteThickness[2], {Line[{{0, 0, 0}, {10, 10, 10}/2}],
> {Polygon[{{5., 5., 5.}, {4., 4.306186217847897, 3.6938137821521027},
> {4., 3.6938137821521027, 4.306186217847897}}]}}}],
> AspectRatio -> Automatic, PlotRange -> All];
>
> Needless to say, most of the time I lose the directives. Does anyone know
> the cause of this?
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
Prev by Date:
**RE: Newbie-?: How to edit an input and recalculate dependent formula's**
Next by Date:
**Re: Assumptions i Mathematica...**
Previous by thread:
**Graphics Directives Lost In Certain Cases**
Next by thread:
**How do you create a ListContourPlot from a mesh of non-equally spaced real numbers?**
| |