From: S. B. Gray on 25 Jun 2010 07:26 I have a Graphics3D with various separate elements. Some elements can be made to appear or not. If I omit elements that range beyond the others, the display rescales so that the remaining ones fill the allotted display size. I would like all displays to appear at the same scale and in the same position in the display area, regardless of what elements are enabled. There must be a way to do this, but how ???? (Note: I'm using cylinders with very short lengths for the primitive, because 3D circles are not available.) Second question: my displays have lots of white space around them. I thought that setting ImageMargins->0 would eliminate them, but no. ?? Here is the display code (may be obscure without supporting code). sel={0} says display everything, else only a few cylinders. show[sel_] := Module[{tcyl, txtb}, If [ sel == {0}, tcyl = Table[Cylinder[{plancirc[[i, 2, 1]],plancirc[[i, 2, 1]] + 0.01*plancirc[[i, 2, 3]]},plancirc[[i, 2, 2]]], {i , 1, sub3L}]; txtb = Table[ Style[Text[IntegerString[ix, 10], centers[[ix]]], FontSize -> 15, Bold, FontFamily -> "Arial"], {ix, sub3L}], tcyl = Table[Cylinder[{plancirc[[sel[[i]], 2, 1]],plancirc[[sel[[i]], 2, 1]] + 0.01*plancirc[[sel[[i]], 2, 3]]},plancirc[[sel[[i]], 2, 2]]], {i , 1, Length[sel]}]; txtb = Table[ Style[Text[IntegerString[sel[[i]], 10], centers[[sel[[i]]]]],FontSize -> 15, Bold, FontFamily -> "Arial"], {i, Length[sel]}] ]; Graphics3D[{Yellow, Opacity[.6], EdgeForm[Black], tcyl, Blue, Opacity[.8], Sphere[points, .40],White, Opacity[.6], Table[Style[Text[xr, points[[xr]]], FontSize -> 24, FontFamily -> "Arial"],{xr, 1, numbr}], PointSize[.011], Black, txtb}, Boxed -> False, ImageSize -> 800, Background -> LightBlue, ImageMargins -> 0, ViewPoint -> {10, 10, 10}] ] Steve Gray
From: David Park on 26 Jun 2010 03:12 1) To fix the plot domain once and for all, just use an explicit PlotRange option. This is an important step in animation or in dynamic plots that switch elements on and off. A dynamic display always requires a fixed background. 2) Circle3D and Disk3D are available in the Presentations package. You could always program them up yourself and put them somewhere where you could easily get them. 3) You can use the option PlotRegion to control the amount of space around a plot. You can make the PlotRegion not only less than 0..1, 0..1, but also greater and that zooms in. You can also zoom in using Shift and the mouse. 4) Unevaluable code is usually too iffy for most responders to look at. David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: S. B. Gray [mailto:stevebg(a)ROADRUNNER.COM] I have a Graphics3D with various separate elements. Some elements can be made to appear or not. If I omit elements that range beyond the others, the display rescales so that the remaining ones fill the allotted display size. I would like all displays to appear at the same scale and in the same position in the display area, regardless of what elements are enabled. There must be a way to do this, but how ???? (Note: I'm using cylinders with very short lengths for the primitive, because 3D circles are not available.) Second question: my displays have lots of white space around them. I thought that setting ImageMargins->0 would eliminate them, but no. ?? Here is the display code (may be obscure without supporting code). sel={0} says display everything, else only a few cylinders. show[sel_] := Module[{tcyl, txtb}, If [ sel == {0}, tcyl = Table[Cylinder[{plancirc[[i, 2, 1]],plancirc[[i, 2, 1]] + 0.01*plancirc[[i, 2, 3]]},plancirc[[i, 2, 2]]], {i , 1, sub3L}]; txtb = Table[ Style[Text[IntegerString[ix, 10], centers[[ix]]], FontSize -> 15, Bold, FontFamily -> "Arial"], {ix, sub3L}], tcyl = Table[Cylinder[{plancirc[[sel[[i]], 2, 1]],plancirc[[sel[[i]], 2, 1]] + 0.01*plancirc[[sel[[i]], 2, 3]]},plancirc[[sel[[i]], 2, 2]]], {i , 1, Length[sel]}]; txtb = Table[ Style[Text[IntegerString[sel[[i]], 10], centers[[sel[[i]]]]],FontSize -> 15, Bold, FontFamily -> "Arial"], {i, Length[sel]}] ]; Graphics3D[{Yellow, Opacity[.6], EdgeForm[Black], tcyl, Blue, Opacity[.8], Sphere[points, .40],White, Opacity[.6], Table[Style[Text[xr, points[[xr]]], FontSize -> 24, FontFamily -> "Arial"],{xr, 1, numbr}], PointSize[.011], Black, txtb}, Boxed -> False, ImageSize -> 800, Background -> LightBlue, ImageMargins -> 0, ViewPoint -> {10, 10, 10}] ] Steve Gray
|
Pages: 1 Prev: Replacement rule limitations Next: RandomReal[] and sampling a distribution |