MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to crop Graphics3D in V7?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94766] Re: [mg94732] How to crop Graphics3D in V7?
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Tue, 23 Dec 2008 07:00:46 -0500 (EST)
  • Reply-to: jfultz at wolfram.com

Actually, this *doesn't* work in later versions of 6.0 (I just tried in 6.0.3).  
I'm not sure whether it should or not.  I'll send your comments to the graphics 
developers.  In version 7, what you're looking for can be accomplished by adding 
the option...

Method->{"ShrinkWrap"->True}

to the Graphics3D options.  This will work for any Graphics3D object, and can 
also be done interactively by right-clicking on a 3D graphic and choosing "Trim 
Bounding Box".

As for the Ctrl+drag cropping problem, that is a known bug which will be fixed 
in the next incremental release of Mathematica.

Sincerely,
 
John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Mon, 22 Dec 2008 05:15:45 -0500 (EST), Cca wrote:
> Hello,
>
> Consider this:
>
> fig = Graphics3D[{FontSize ->
> 28, {Translate[{{Text[b, {1, 0, 0}, {0, -1}],
> Text[h, {2, 0, 2}, {1, 0}]},
> Polygon[{{0, 0, 0}, {2, 0, 0}, {2, 0, 4}, {0, 0, 4}}]}, {0,
> 1/Pi, 0}], Opacity[0.5],
> Cylinder[{{0, 0, 0}, {0, 0, 4}}, 1/Pi]},
> Translate[{Translate[{{Text[h, {2, 0, 0}, {0, -1}],
> Text[b, {4, 0, 1}, {1, 0}]},
> Polygon[{{0, 0, 0}, {4, 0, 0}, {4, 0, 2}, {0, 0, 2}}]}, {0,
> 2/Pi, 0}], Opacity[0.5],
> Cylinder[{{0, 0, 0}, {0, 0, 2}}, 2/Pi]}, {3.1, 0, 0}],
> Text[b < h, Scaled[{0.8, 1, 1}]]},
> ViewPoint->{-0.02, -1.6, -1.5},
> SphericalRegion->True,
> Boxed->False,
> Axes->False,
> PlotRange->{{-1/Pi, 7.1}, {-0.7, 0.7}, {0, 4}},
> ImageSize->{488, Automatic}]
>
> In Mathematica 6, the following works:
>
> Append[fig, ImagePadding -> {{0, 0}, {-120, -150}}]
>
> The image is similar to what we get with
>
> ImageCrop[fig]
>
> However, ImagePadding with negative values no longer works in V7. What
> combination of options do I have to use to crop the Graphics3D above
> (without using Inset in Graphics)?
>
> BTW, interactive cropping (Ctrl+drag) is not working in V7 with Windows
> XP.
>
>
> Cordialmente,
>
> Carlos C=E9sar de Ara=FAjo
> Gregos & Troianos Educacional
> http://www.gregosetroianos.mat.br
> MSN: cca_gregosetroianos at hotmail.com
> Belo Horizonte, MG, Brasil
> (31) 3283-1122





  • Prev by Date: Re: How to crop Graphics3D in V7?
  • Next by Date: Re: Re: Display of Alternatives Symbol in Notebooks in Version 7
  • Previous by thread: Re: How to crop Graphics3D in V7?
  • Next by thread: Re: Re: Display of Alternatives Symbol in