Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

RE: Lost Line Directives in 3D Graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30180] RE: Lost Line Directives in 3D Graphics
  • From: Tom Burton <tburton at brahea.com>
  • Date: Wed, 1 Aug 2001 02:19:44 -0400 (EDT)
  • References: <ecjdmtck6q6n6tvch6qqalmk684r5e0h7t@4ax.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello David,

I'll stipulate that we all see what you see with the arrow with two 
coincident lines, but I continue to think what we see does not indicate a 
rendering error. So let me turn to another of your examples, the first 
additional one you raised in your last memo. In the notebook embedded at 
the end of this memo, I tried to reconstruct the example: a book rotating 
around the origin with axes in your style. Apart from a little jiggling of 
the stems of the axis-arrows, I still don't see anything wrong. Does the 
final animation in my notebook look OK to you? Of not, then perhaps you 
have found a system-dependent problem.

Regards,

Tom

At 03:00 PM 7/31/01 -0400, David Park wrote:
>I believe that this is more than just round off error, or an arbitrary
>choice of what to display. The example I posted was just one of many similar
>problems I encountered. I posted it because I wanted something that was
>clean and unrelated to my own packages and code. So far, everyone who has
>tried it sees the same effect. Nevertheless, let me describe some of the
>other effects I have obtained.
>
>I am trying to write a notebook that illustrates 3D rotation sequences. I
>use an Arrow3D routine from my DrawingArrows package to draw axes. A 3D
>arrow is composed of a line and a polygonal cone at the tip. I have another
>routine which draws a book rotated about the origin by a rotation matrix.
>
>In one animation, the three axes stay fixed and the book is rotated. In most
>of the frame cells the arrow cone is missing from the y-axis (but not the x
>and z axes). In a few frames the cone suddenly reappears. I am using a fixed
>plot range and the cone itself is not rotating or changing in any way from
>frame to frame. Nor is there any other element on top of or coincident with
>the cone, in 3D or in perspective, in most of the bad frames.

[text deleted]

Notebook[{

Cell[CellGroupData[{
Cell["Park 1", "Title"],

Cell["Possible rendering problems in 3D graphics.", "Subtitle"],

Cell["\<\
T E Burton
July 31, 2001\
\>", "Subsubtitle"],

Cell["Conversation with David Park via MathGroup.", "Text"],

Cell[CellGroupData[{

Cell["Introduction", "Section"],

Cell[BoxData[
     \($Version\)], "Input"],

Cell[BoxData[
     \($OperatingSystem\)], "Input"],

Cell["\<\
All output has been removed to save space. Execute the entire \
notebook to restore the output.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell["Check the post of 7/29", "Section"],

Cell[CellGroupData[{

Cell["Commands from the post", "Subsection"],

Cell[BoxData[
     \(Needs["\<Graphics`Animation`\>"]\)], "Input"],

Cell[BoxData[
     \(\(grafs = {Line[{{0, 0, 0}, {2, 0, 0}}],
           RGBColor[1.`, 0.`, 0.`],
           AbsoluteThickness[
             4], {Line[{{0, 0, 0}, {0.999`, 0,
                   0}}], {Polygon[{{1.`, 0.`,
                     0.`}, {0.6666666666666667`, 0.`,
                     0.16666666666666666`}, {0.6666666666666667`, \
\(-0.14433756729740643`\), \(-0.08333333333333333`\)}}],
               Polygon[{{1.`, 0.`,
                     0.`}, {0.6666666666666667`, \
\(-0.14433756729740643`\), \(-0.08333333333333333`\)}, \
{0.6666666666666667`,
                     0.14433756729740643`, \
\(-0.08333333333333333`\)}}],
               Polygon[{{1.`, 0.`, 0.`}, {0.6666666666666667`,
                     0.14433756729740643`, \(-0.08333333333333333`\)}, \
{0.6666666666666667`, 0.`,
                     0.16666666666666666`}}]}}};\)\)], "Input"],

Cell[BoxData[
     \(\(plot1 =
         Show[Graphics3D[grafs],
           PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\),
                   1}}\ 2, ImageSize \[Rule] 500,
           Boxed \[Rule] False];\)\)], "Input"],

Cell["SpinShow[plot1];", "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Discussion", "Subsection"],

Cell["\<\
Yes, the thick line is sometimes hidden. I still don't think this is \
a bug, but perhaps this is not typical of the problems David Park is \
having. Perhaps the rotating book example below will be more \
representative.\
\>", "Text"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["The rotating book", "Section"],

Cell["\<\
A book rotating around the origin in the XY plane with David \
Park-type axes, as described in e-mail of 7/31/01.\
\>", "Text"],

Cell[CellGroupData[{

Cell[TextData[{
   StyleBox["3D Stretch, turn, and move",
     FontFamily->"Times New Roman",
     FontSize->14],
   StyleBox["\:f35f",
     FontSize->14],
   ""
}], "Subsection"],

Cell["\<\
Some of the utilities are handy for constructing the graphic in \
question.\
\>", "Text"],

Cell[BoxData[
     \(\(stretch::usage = "\<expr /. stretch[a_,b_,c_] replaces all \
subexpressions {x, y, z} in expr with {a x, b y, c z}. The reduced \
form stretch[a] scales all three directions by the common factor \
a.\>";\)\)], "Input",
   InitializationCell->True],

Cell[BoxData[
     \(stretch[f_] := stretch[f, f, f]\)], "Input",
   InitializationCell->True],

Cell[BoxData[
     \(stretch[a_, b_,
         c_] := {x_?NumericQ, y_?NumericQ,
           z_?NumericQ} \[RuleDelayed] {a\ x, \ b\ y, \
           c\ z}\)], "Input",
   InitializationCell->True],

Cell[BoxData[
     RowBox[{
       RowBox[{\(turn::usage\), "=",
         "\"\<expr /. turn[b_?MatrixQ] replaces all subexpressions {x, \
y, z} in expr with Transpose[basis].{x, y, z}, rotating expr from the \
global Cartesian basis (\!\(\*GridBox[{
{\(1\), \(0\), \(0\)},
{\(0\), \(1\), \(0\)},
{\(0\), \(0\), \(1\)}
}]\)) to the supplied basis b. See also the function basis. The \
reduced form turn[\[Theta]] rotates by angle \[Theta] in the global \
XY plane.\>\""}], ";"}]], "Input",
   InitializationCell->True],

Cell[BoxData[
     \(turn[
         basis_?MatrixQ] := {x_?NumericQ, y_?NumericQ,
           z_?NumericQ} \[RuleDelayed]
         Transpose[basis] . {x, y, z}\)], "Input",
   InitializationCell->True],

Cell[BoxData[
     RowBox[{\(turn[\[Theta]_]\), ":=",
       RowBox[{"turn", "[",
         RowBox[{"(", "\[NoBreak]", GridBox[{
               {\(Cos[\[Theta]]\), \(Sin[\[Theta]]\), "0"},
               {\(-\ Sin[\[Theta]]\), \(Cos[\[Theta]]\), "0"},
               {"0", "0", "1"}
               }], "\[NoBreak]", ")"}], "]"}]}]], "Input",
   InitializationCell->True],

Cell[BoxData[
     \(\(move::usage = "\<expr /. move[a, b, c:0]  replaces all \
subexpressions {x, y, z} in expr with {x, y, z} + {a, b, c}, \
translating expr by the vector {a, b, c}.\>";\)\)], "Input",
   InitializationCell->True],

Cell[BoxData[
     \(move[a_, b_,
         c_:  0] := {x_?NumericQ, y_?NumericQ,
           z_?NumericQ} \[RuleDelayed] {x, y, z} + {a, b,
             c}\)], "Input",
   InitializationCell->True]
}, Closed]],

Cell[CellGroupData[{

Cell["Construct axes", "Subsection"],

Cell[BoxData[
     \(\(arrowDP = {AbsoluteThickness[
             4], {Line[{{0, 0, 0}, {0.999`, 0,
                   0}}], {Polygon[{{1.`, 0.`,
                     0.`}, {0.6666666666666667`, 0.`,
                     0.16666666666666666`}, {0.6666666666666667`, \
\(-0.14433756729740643`\), \(-0.08333333333333333`\)}}],
               Polygon[{{1.`, 0.`,
                     0.`}, {0.6666666666666667`, \
\(-0.14433756729740643`\), \(-0.08333333333333333`\)}, \
{0.6666666666666667`,
                     0.14433756729740643`, \
\(-0.08333333333333333`\)}}],
               Polygon[{{1.`, 0.`, 0.`}, {0.6666666666666667`,
                     0.14433756729740643`, \(-0.08333333333333333`\)}, \
{0.6666666666666667`, 0.`,
                     0.16666666666666666`}}]}}};\)\)], "Input"],

Cell[BoxData[
     \(\(Show[Graphics3D[arrowDP]];\)\)], "Input"],

Cell[BoxData[
     RowBox[{
       RowBox[{"axesDP", "=",
         RowBox[{
           RowBox[{
             RowBox[{\(arrowDP /. stretch[15]\), "/.",
               RowBox[{"turn", "[",
                 RowBox[{"RotateLeft", "[",
                   RowBox[{
                     RowBox[{"(", GridBox[{
                           {"1", "0", "0"},
                           {"0", "1", "0"},
                           {"0", "0", "1"}
                           }], ")"}], ",", "#"}], "]"}], "]"}]}],
             "&"}], "/@", \({0, 1, 2}\)}]}], ";"}]], "Input"],

Cell[BoxData[
     \(\(Show[Graphics3D[axesDP]];\)\)], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Construct a simple book", "Subsection"],

Cell["\<\
Perhaps this book is not complicated enough to show the symptoms.\
\>", "Text"],

Cell[BoxData[
     \(\(book =
         With[{W = 6, H = 10,
             T = 1}, \[IndentingNewLine]{\(Polygon[{{\(-W\), \(-H\), \
#}, {W, \(-H\), #}, {W, H, #}, {\(-W\), H, #}}/2] &\) /@ {\(-T\),
                 T}, \(Polygon[{{#, \(-H\), \(-T\)}, {#,
                         H, \(-T\)}, {#, H, T}, {#, \(-H\), T}}/
                     2] &\) /@ {\(-W\),
                 W}, \(Polygon[{{\(-W\), #, \(-T\)}, {W, #, \(-T\)}, \
{W, #, T}, {\(-W\), #, T}}/2] &\) /@ {\(-H\),
                 H}}\[IndentingNewLine]];\)\)], "Input"],

Cell[BoxData[
     \(\(Show[Graphics3D[{axesDP, book}]];\)\)], "Input"],

Cell[BoxData[
     \(PlotRange /. AbsoluteOptions[%]\)], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Prepare the animation", "Subsection"],

Cell[BoxData[
     \(\(Table[
         Show[Graphics3D[{axesDP, book /. turn[\[Theta]]},
             PlotRange \[Rule] {{\(-8\), 16}, {\(-8\), 16}, {\(-2\),
                   16}}]], {\[Theta], 0  \[Degree], 350  \[Degree],
           10  \[Degree]}];\)\)], "Input"]
}, Closed]],

Cell[CellGroupData[{

Cell["Observations", "Subsection"],

Cell["\<\
The stems of the arrows jump around a little. I see no other \
problems.\
\>", "Text"]
}, Closed]]
}, Closed]]
}, Open  ]]
},
FrontEndVersion->"4.1 for Microsoft Windows",
ScreenRectangle->{{0, 1280}, {0, 979}},
AutoGeneratedPackage->None,
WindowSize->{828, 740},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
StyleDefinitions -> "Classroom.nb"
]


Tom Burton, <tburton at brahea.com>, <http:www.brahea.com>
353 Sanford Street, Encinitas CA 92024, 760/436-7436



  • Prev by Date: latex and Mathematica, problems
  • Next by Date: "No more memory "
  • Previous by thread: RE: Lost Line Directives in 3D Graphics
  • Next by thread: RE: Lost Line Directives in 3D Graphics