MathGroup Archive 2011

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

Search the Archive

Re: AxesLabel parallel to 3D axes?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118840] Re: AxesLabel parallel to 3D axes?
  • From: JUN <noeckel at gmail.com>
  • Date: Fri, 13 May 2011 06:24:36 -0400 (EDT)
  • References: <i2rm0a$r4c$1@smc.vnet.net> <i33cph$81k$1@smc.vnet.net> <iqg5th$d0t$1@smc.vnet.net>

On May 12, 1:31 am, "Christopher O. Young" <c... at comcast.net> wrote:
> Isn't there some way to paste images onto surfaces in 3D views? Then, if we
> could just have a flat rectangle with an image of the label on it, we'd be
> all set. Especially if the rectangle could be transparent while the
> lettering on it could be kept opaque.
>
> On 8/1/10 4:55 AM, in article i33cph$81... at smc.vnet.net, "Fred Klingener"
>
>
>

Yes, there is:


rasterText[s_, bg_:None] :=
 With[{r = Rasterize[Style[s, Magnification -> 10], Background ->
bg]},
  Apply[Graphics3D[{EdgeForm[], Texture[r],
      Polygon[{{0, 0, 0}, {#1, 0, 0}, {#1, #2, 0}, {0, #2, 0}},
       VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0,
          1}}]}] &, ImageDimensions[r]]]


Show[rasterText[Style["This is a text", FontFamily -> "Times"]],
 Lighting -> "Neutral", Boxed -> False]


The only problem is that Mathematica doesn't allow us to use
transparent textures, so the 3D text will be on a solid background.

In Fred's bitmap solution, you can have what amounts to a transparent
background, but at the expense of a large polygon count.

Jens


  • Prev by Date: Re: Mathematica handling of on where it saves current open notebook (again)
  • Next by Date: Re: and color via PlotStyle
  • Previous by thread: Re: AxesLabel parallel to 3D axes?
  • Next by thread: Re: How to select all cells in a notebook with specific property?