MathGroup Archive 2007

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

Search the Archive

Re: Problems updating Graphics3D Polygons


Thanks.  Jean-Marc noticed in my original post that I just didn't call the function correctly.  I like the code you used below, the pts.{{1,0,0},{0,1,0},{0,0,ratio}}.  I see what it does just not sure of the construct.  I'll figure it out though.  Thanks!

> "In[473]:ExpandZ[g_,ratio_]:     
> g/.Polygon[pts_]:>Polygon[{#[[1]],#[[2]],#[[3]]*ratio}
> & /@pts];"
> 
> There are a couple of "=" signs missing; not sure
> what you're seeing at  
> your machine.
> 
> This works at mine:
> 
> Clear[expandZ]
> expandZ[g_, ratio_] :=
>    g /. Polygon[pts_] :>
> Polygon[{#[[1]], #[[2]], #[[3]]*ratio} & /@
> & /@ pts];
> 
> But I prefer
> 
> Clear[expandZ]
> expandZ[g_, ratio_] :=
>    g /. Polygon[pts_] :>
> Polygon[pts.{{1, 0, 0}, {0, 1, 0}, {0, 0,
> 0, 0, ratio}}];
>


  • Prev by Date: Re: Help with formatting output
  • Next by Date: Re: newlines, newlines ...
  • Previous by thread: Re: Problems updating Graphics3D Polygons
  • Next by thread: Re: Re: Problems updating Graphics3D Polygons