Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6676

Re: Texture on Disk in Mathematica 8?

From Heike Gramberg <heike.gramberg@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Texture on Disk in Mathematica 8?
Date 2011-11-24 11:57 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jalbf8$sbm$1@smc.vnet.net> (permalink)
References <201111231204.HAA14855@smc.vnet.net>

Show all headers | View raw


Applying Texture to a disk directly isn't possible, but you could for example use RegionPlot with the TextureCoordinateFunction option, e.g.

img = <<Texture image>>

RegionPlot[x^2 + y^2 < 1, {x, -1, 1}, {y, -1, 1},
 BoundaryStyle -> None,
 Axes -> False, Frame -> False,
 PlotStyle -> Directive[Opacity[1], Texture[img]],
 TextureCoordinateFunction -> ({#1, #2} &)]

Heike.

On 23 Nov 2011, at 13:04, michael@socratica.com wrote:

> Is it possible to apply a texture to a disk?
>
> Applying a texture to a polygon works fine:
> Graphics[{Texture[<<Texture Image>>],
>  Polygon[{{0, 0}, {1, 0}, {1/2, 1}},
>   VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1/2, 1}}]}]
>
> But when I try to apply it to a disk I get a solid, black circle:
>  Graphics[{Texture[<<Texture Image>>], Disk[{0, 0}, 1]}]
>
> Thanks!
> -Michael
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Texture on Disk in Mathematica 8? Heike Gramberg <heike.gramberg@gmail.com> - 2011-11-24 11:57 +0000
  Re: Texture on Disk in Mathematica 8? Michael Harrison <michael@socratica.com> - 2011-11-26 11:48 +0000

csiph-web