Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5995
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Projecting 2d image on 3d object |
| Date | 2011-10-29 11:18 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j8gne9$5e4$1@smc.vnet.net> (permalink) |
| 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
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Projecting 2d image on 3d object Heike Gramberg <heike.gramberg@gmail.com> - 2011-10-29 11:18 +0000
csiph-web