MathGroup Archive 2001

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

Search the Archive

Re: Function Coloring with ParametricPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31282] Re: [mg31264] Function Coloring with ParametricPlot3D
  • From: Omega Consulting <omega_consulting at yahoo.com>
  • Date: Fri, 26 Oct 2001 04:28:29 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 08:59 PM 10/23/2001, David Park wrote:
>Dear MathGroup,
>
>There is a percularity of the ParametricPlot3D command with color
>specification as the fourth element that bugs me.
>
>(snip)
>
>What I would like to do is have Mathematica determine a single function
>value for each square, perhaps by averaging the values at the four corners,
>and then apply my color function to that single value. In that case there
>would be no blending, unless I decide to do the blending in my color
>function.
>
>Does anyone know how to work around this?
>
>David Park
>djmp at earthlink.net
>http://home.earthlink.net/~djmp/

You can color your ParametricPlot manually.

Here's a function that averages the points in a Polygon and gets the color 
at that point.

col[pts_] :=Module[{x,y,z},
     {x,y,z}=(Plus@@pts)/(Length@pts);
     cfun[x,y]
     ]

Then use a replacement rule to add a color primitive to each Polygon.

Show[ParametricPlot3D[{x, y, 0}, {x, 0, 10}, {y, 0, 10},
  PlotPoints -> 8, Lighting -> False,  DisplayFunction->Identity] /.
    Polygon[pts_]:>{col[pts], Polygon[pts]},
  DisplayFunction->$DisplayFunction];

--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"

Spend less time searching and more time finding.
http://www.wz.com/internet/Mathematica.html



  • Prev by Date: Simplify with If and UnitStep
  • Next by Date: Re: Function Coloring with ParametricPlot3D
  • Previous by thread: Function Coloring with ParametricPlot3D
  • Next by thread: Re: Function Coloring with ParametricPlot3D