Re: Extracting Graphics3D from Plots
- To: mathgroup at smc.vnet.net
- Subject: [mg95654] Re: [mg95634] Extracting Graphics3D from Plots
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 24 Jan 2009 06:17:32 -0500 (EST)
- References: <200901221201.HAA11196@smc.vnet.net> <200901231007.FAA03347@smc.vnet.net>
It's not difficult as long as you pay attention to the InputForm of
your Graphic3D object. Usually it will contain a GraphicsComplex
primitive, which makes this particularly easy. Here is an example
Here is a Grpahics3D object from the Documentation obtained by using
RevolutionPlot3D
gr = RevolutionPlot3D[t^4 - t^2, {t, 0, 1}]
Here is the rotation transform:
tt = RotationTransform[Pi/3, {0, 1, 0}];
Now rotate gr:
gr1 = gr /. v__GraphicsComplex :> GeometricTransformation[v, tt];
Now show it with the option PlotRange set to All:
Show[gr1, PlotRange -> All]
Andrzej Kozlowski
On 23 Jan 2009, at 11:07, Ernst H.K. Stelzer wrote:
> Dear Mathematicans,
>
> a problem I have been struggling for quite a while is how to extract
> a manipulatable Graphics3D object from the result of e.g. a Plot3D
> or RevolutionPlot3D call. By manipulatable I mean an object I can
> rotate or translate using "RotationTransform" and then combine with
> other objects such as "Cylinder". What I do not intend to do is use
> "Epilog" in a Plot3D call.
>
> I am actually looking for the CORRECT Mathematica-way, i.e. the one
> anticipated by the Wolfram people and not some workaround that might
> fail in future versions of Mathematica.
>
> Somewhat related is another question. Is it possible to put a
> texture on a "Cylinder", "Tube" or "Cone"? I do know how to place
> an image onto the surface of a Plot3D output (in a seemingly correct
> Mathematica way, see below).
>
> Greetings
>
> Ernst
>
>
>
> img = Import["ExampleData/rose.gif"]
>
> imgS = Rasterize[img, "Data", RasterSize -> {32, 32}]/255.0;
>
> Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, =
>
> ColorFunction -> (RGBColor[
> imgS[[1 + Round[10 #1], 1 + Round[10 #2]]]] &), =
>
> ColorFunctionScaling -> False, Mesh -> False, PlotPoints -> 32]
>
>
- References:
- Newbie Question - Change 3D Bar Chart Background Color
- From: Tim Heger <timheger@usrbs.com>
- Extracting Graphics3D from Plots
- From: "Ernst H.K. Stelzer" <stelzer@embl.de>
- Newbie Question - Change 3D Bar Chart Background Color