MathGroup Archive 2011

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

Search the Archive

Re: Projecting 2d image on 3d object

If you're using Mathematica 8 you can use Texture in combination with 
TextureCoordinateFunction to do this. For example

img = ExampleData[{"TestImage", "Lena"}];
Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi},
 Mesh -> None,
 Lighting -> "Neutral",
 TextureCoordinateFunction -> ({#1, #2} &),
 PlotStyle -> Directive[Texture[img]]]


On 28 Oct 2011, at 11:34, Mark Coleman wrote:

> Greetings,
> I recall seeing a recent Mathematica write-up that described how to
> project an arbitrary 2D image -- say a photo on a person -- onto a 3D
> object, such as cube, sphere, etc. I'm curious if anyone can refer me
> to some code snippet that illustrates this technique.
> Thanks
> Mark

  • Prev by Date: Re: Mathematica 8.0.4 now available
  • Next by Date: Re: Problem with Solve and NSolve
  • Previous by thread: Projecting 2d image on 3d object
  • Next by thread: Re: Projecting 2d image on 3d object