MathGroup Archive 2002

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

Search the Archive

RE: Mathematica's color limitations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34435] RE: [mg34406] Mathematica's color limitations
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Sun, 19 May 2002 04:15:15 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

When I evaluate your "color wheel" and use //Timing, it takes about 2.8
seconds.

At the default size there are significant gaps as you've mentioned ---
points uncolored --- but if I expand the chart manually, the gaps
sometimes almost entirely disappear.  Using ImageSize to expand the
chart doesn't work as well, for some reason!

Also, adding AspectRatio->Automatic to the Show command makes the wheel
circular.

Bobby

-----Original Message-----
From: Michael Math [mailto:michael-math at science.edu] 
To: mathgroup at smc.vnet.net
Subject: [mg34435] [mg34406] Mathematica's color limitations

Mathematica seems to have some limitations dealing with colors, and I
was
wondering if there are any workarounds or solutions to these problems.

First, I am having a hard time getting my color output to display in the
colors I specify.  I am trying to make three dimensional plots which
heavily
involve color and require the output to be freely rotated to make sense
of
the image.  The RealTime3D package does not obey the colors I give under
Mathematica 4.0 (under Windows). Does anyone know if this has been fixed
in
4.1?   I have also tried the MathGL3d OpenGLViewer, but it does not work
either.  Basically what I am doing is creating a field of points, along
these lines:

pts = Table[{Hue[a,b,c],Point[{a,b,c}]},
{a,0,1,0.05},{b,0,1,0.05},{c,0,1,0.05}];
Show[Graphics3D[pts]];

This is the most basic form, however in other plots I am varying the
size of
the points and not drawing some of the points.  The Default3D view draws
everything fine, except that I can't rotate it freely.  Yes I can draw
several plots and animate them but it takes a long time and isn't quite
the
same - for example, I can't zoom in and out. RealTime3D displays all my
points as black and fixed size.  The OpenGLViewer does not give the
right
color to my points, but it seems to get the size ok.  The color is the
most
important thing!

The second problem I am having is that there does not seem to be any
easy
way to generate a plot where color is based on all the coordinates in
the
plot.  As a result of this I have to resort to the above point method.
All
the cases where Mathematica lets you specify color seem to be through
the
ColorFunction option, which takes the z value in the plot as the input
to
the color function.  This is not acceptable to me, as I need to know at
least the x and y values in order to determine the color (and possibly z
as
well).    So for example, to display a color wheel I have to do
something
like this:

Show[Graphics[{
        Table[{Hue[a/(2 Pi), 1, r], Point[N[{r*Sin[a], r*Cos[a]}]]}, {a,
0,
            2 Pi, Pi/256}, {r, 0, 1, 0.01}]
        }
      ]];

This takes too long and even with all these points still does not fill
in
all the points in the circle.

I have tried converting hues and rgb colors to flat integers, but then I
wind up with 3D shapes that I am not sure how to generate - for example,
in
one case I appear to need the formula for something resembling an
exponential spiral.

Help? :-)

Michael








  • Prev by Date: RE: Re: Plot Random Walk!
  • Next by Date: Re: Package Problems
  • Previous by thread: Mathematica's color limitations
  • Next by thread: MathInstaller fails in SuSE 8.0