MathGroup Archive 1997

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

Search the Archive

Re: Graphics manipulation question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8396] Re: [mg8318] Graphics manipulation question
  • From: Fabian Haas <b5hafa at rz.uni-jena.de>
  • Date: Tue, 26 Aug 1997 20:41:36 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

"Seth J. Chandler" <SChandler at uh.edu> wrote


>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

Well,
if I am right you could do it with a If[] statement within the Graphics comm=
and.

Show[ Graphics[ If[ t =3D=3D True, {q, First}, q]]]

So you primitive or the modified primitive is return.

Cheers

=46abian





-------------------------------------------------------------------------
Dipl.Biol. Fabian Haas, MPhil
Institut f=FCr Spezielle Zoologie und Evolutionsbiologie
Erbertstr. 1
D-07743 Jena
b5hafa at pop3.uni-jena.de
http://www.zoo.uni-jena.de/~fabian/
Deutschland / Germany
TEL  ++ 49 3641 630 424
=46AX  ++ 49 3641 630 392
                               :-)  (-:
-------------------------------------------------------------------------




  • Prev by Date: Re: Errors While Creating Simple Graph
  • Next by Date: Re: Threading objects of unequal length
  • Previous by thread: Graphics manipulation question
  • Next by thread: Re: Graphics manipulation question