MathGroup Archive 2003

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

Search the Archive

Re: ListSurfacePlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41656] Re: ListSurfacePlot3D
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 29 May 2003 08:15:33 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <200305281504.28708.miglio@merate.mi.astro.it>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and
<< Graphics`Graphics3D`

apts = Table[{Cos[t] Cos[u], Sin[t] Cos[u], Sin[u], Hue[t*u]}, {t, 0,
Pi, 
        Pi/5}, {u, 0, Pi/2, Pi/10}];

AveColor[clst_] := Module[{lst},
     lst = List @@@ clst;
    lst = Plus @@ lst/Length[lst];
    First[Union[Head /@ clst]] @@ lst
    ]

gg = ListSurfacePlot3D[apts, DisplayFunction -> Identity];

Show[gg /. p : Polygon[{{_, _, _, _} ..}] :> {AveColor[Last /@ p[[1]]], 
        Polygon[ Drop[#, -1] & /@ p[[1]]]}, 
  DisplayFunction -> $DisplayFunction, Lighting -> False]

will show you the colors.

If you just start with Mathematica you will love the simple
code above.

Regards
  Jens


Andrea Miglio wrote:
> 
> Hello,
> thanks a lot for your mail,
> what I need to plot is a surface like the one I simply obtain with
> ParametricPlot3D[{fx(r,t),fx(r,t),fx(r,t),
> shade(r,t)},{r,r0,r1},{t,t0,t1}]
> 
> like
> 
> ParametricPlot3D[{r*Cos[t], 0, r*Sin[t], GrayLevel[r]}, {r, 0, 1},
> {t,Pi/2, 3/2Pi}, Lighting -> False]
> 
> but reading the function shade(r,t) from a data-set stored in a file,
> with ListSurfacePlot3D I could not find a way to do that, but it
> could be I miss the trivial way to do it .. (I just started using
> mathematica)
> 
> thanks for your help,
> 
> regards,
> 
> Andrea Miglio


  • Prev by Date: Re: N[ ] function problem
  • Next by Date: Corrupted Files
  • Previous by thread: ListSurfacePlot3D
  • Next by thread: RE: ListSurfacePlot3D