Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6676 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-11-24 11:57 +0000 |
| Last post | 2011-11-26 11:48 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-11-24 11:57 +0000 |
| Subject | Re: Texture on Disk in Mathematica 8? |
| Message-ID | <jalbf8$sbm$1@smc.vnet.net> |
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
>
[toc] | [next] | [standalone]
| From | Michael Harrison <michael@socratica.com> |
|---|---|
| Date | 2011-11-26 11:48 +0000 |
| Message-ID | <jaqjma$oj4$1@smc.vnet.net> |
| In reply to | #6676 |
Excellent! This worked like a charm. Thank you!! -Michael
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web