plot3d, coloring



Mario Rodriguez a ?crit :
> El dom, 12-12-2010 a las 14:58 +0300, Stanislav Maslovski escribi?:
>> On Fri, Dec 10, 2010 at 03:58:24PM +0000, Stanislav Maslovski wrote:
>>> Hello maxima-list,
>>>
>>> I am having a hard time with colors in a 3d plot. The command is like
>>> this (please, do not mind the arbitrary line breaks that this completely
>>> stupid MUA makes)
>> [ skipped ]
>>
>> Is there really no workaround for this? Trying to ask for a second
>> time, now attaching a batch file. It produces surfaces with black top
>> and red bottom, but how can I change this to red and blue?
>
> Not sure if this is what you are looking for. At this time, it is not
> possible to paint with difference colors the two sides of the same
> surface with package draw.
>
> load("draw")$
>
> draw3d(
>   color = red,
>   explicit(kz^2+ky^2,kz, -6, 6, ky, -6, 6),
>   color = blue,
>   explicit(kz^2-ky^2,kz, -6, 6, ky, -6, 6),
>   terminal = eps_color,
>   eps_width = 8.6,
>   eps_height = 6.45,
>   font = "TimesRoman",
>   font_size = 14,
>   surface_hide = true )$
>
>
> --
> Mario
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
Of course you can cheat slightly to obtain bicolored surfaces by 
doubling them. Not exact (and the .5 constant is adjusted manually) and 
not general, but sometimes useful :

draw3d(
  color = red,
  explicit(kz^2+ky^2+.5,kz, -6, 6, ky, -6, 6),
  explicit(kz^2-ky^2+.5,kz, -6, 6, ky, -6, 6),
  color = blue,
  explicit(kz^2+ky^2,kz, -6, 6, ky, -6, 6),
  explicit(kz^2-ky^2,kz, -6, 6, ky, -6, 6),
  eps_width = 8.6,
  eps_height = 6.45,
  font = "TimesRoman",
  font_size = 14,
  surface_hide = true )$

Eric