MathGroup Archive 2007

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

Search the Archive

Bug with 3D graphics lines


Seems to be a problem with Line when drawing a line in 3D. The following code correctly draws the vertical line from z=0 to z=2:

line1 = Line[{{0, 0, 0}, {4, 4, 0}}];
line2 = Line[{{0, 0, 0}, {0, 0, 2}}]
Show[Graphics3D[{line1, line2}], 
 PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}}, Axes -> True, 
 AxesLabel -> {x, y, z}]

However, when I specify that the line is to be drawn with x and y coordinates not equal to zero, the line is incorrectly drawn:

line1 = Line[{{0, 0, 0}, {4, 4, 0}}];
line2 = Line[{{1,1, 0}, {1,1, 2}}]
Show[Graphics3D[{line1, line2}], 
 PlotRange -> {{-5, 5}, {-5, 5}, {0, 5}}, Axes -> True, 
 AxesLabel -> {x, y, z}]

In 5.2, the lines are drawn correctly.


  • Prev by Date: RE: Plot question
  • Next by Date: Re: Grid
  • Previous by thread: Re: Log of y-axis data?
  • Next by thread: Re: Bug with 3D graphics lines