MathGroup Archive 2008

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

Search the Archive

Reading Directive Values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90797] Reading Directive Values
  • From: Andy Anderson <aanderson at amherst.edu>
  • Date: Thu, 24 Jul 2008 04:54:52 -0400 (EDT)
  • References: <1766B32F-CC9E-4A39-9FC7-D5BE3BFBE490@amherst.edu>

I would like to be able to define graphics objects whose color  
scheme, lighting, etc. might be changed by graphics directives in an  
"informed" way. In order to do this, I need to be able to read the  
current state of graphics directives. What I need is a function like  
OptionValue, but I can't find one after substantial perusal of  
official and unofficial documentation.

For example, I'd like to be able to define something along these lines:

	pg = {If[DirectiveValue[Hue][[3]] <= 0.3, Brown, Sequence[],  
Yellow], Polygon[{{1, 0, 0}, {1, 1, 1}, {0, 0, 1}}]} ;

so that

	Graphics3D[pg]
	Graphics3D[{Red, pg}]
	Graphics3D[{Black, pg}]

would produce yellow, red, and brown polygons.

Any suggestions?

Thanks,

-- Andy



  • Prev by Date: Function Programming Problems
  • Next by Date: Re: Can't integrate sqrt(a+b*cos(t)+c*cos(2t))
  • Previous by thread: Re: Function Programming Problems
  • Next by thread: Re: Reading Directive Values