Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Projecting 2d image on 3d object

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122462] Re: Projecting 2d image on 3d object
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sat, 29 Oct 2011 07:11:01 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110280934.FAA20731@smc.vnet.net>

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]]]

Heike.

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