[Date Index]
[Thread Index]
[Author Index]
Re: Extracting Graphics3D from Plots
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]
>
>
Prev by Date:
**Re: Frames on Density Plots in Version 7**
Next by Date:
** Re: Map onto one column of a matrix**
Previous by thread:
**Extracting Graphics3D from Plots**
Next by thread:
**Re: Extracting Graphics3D from Plots**
| |