MathGroup Archive 1997

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

Search the Archive

Graphics manipulation question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8318] Graphics manipulation question
  • From: "Seth J. Chandler" <SChandler at uh.edu>
  • Date: Sun, 24 Aug 1997 13:24:33 -0400
  • Organization: University of Houston Law Center
  • Sender: owner-wri-mathgroup at wolfram.com

Suppose one has a Mathematica Graphics expression called g. And suppose
further that one has a list of graphics primitives called p. And one has
a boolean test function t. I want to transform the graphics expression g
in the following way. Each time I encounter a primitive q in g that
satisfies the boolean test function t I want to replace that primitive q
with {q,First[p]} and to then delete the first element of p. If the
primitive q does not satisfy t, then I want to leave q alone. A
practical application of this concept might be to ascribe different
colors to some points scattered through a graphics expression.

Any ideas how to do this with a modicum of elegance?

Seth J. Chandler
Associate Professor of Law
University of Houston Law Center



  • Prev by Date: Re: Extracting the domain of a function, dynamic programming
  • Next by Date: Re: postscript problems
  • Previous by thread: Re: Goofy text behavior
  • Next by thread: Re: Graphics manipulation question