title: Help in using rgl package
body: <p>I installed rgl package with the option --disable-libpng. I tried generating a 3d scatter plot and it crashes. Please help me in resolving this</p>
  
  <p>This is the code i am running</p>
  
  <pre><code>library(rgl)
  open3d()
  x &lt;- sort(rnorm(1000))
  y &lt;- rnorm(1000)
  z &lt;- rnorm(1000) + atan2(x,y)
  plot3d(x, y, z, col=rainbow(1000))
  </code></pre>
  
  <p>It crashes with below messages</p>
  
  <pre><code> *** caught segfault ***
  address (nil), cause 'memory not mapped'
  
  Traceback:
   1: .External(rgl_par3d, args)
   2: par3d(skip)
   3: plot3d.default(x, y, z, col = rainbow(1000))
   4: plot3d(x, y, z, col = rainbow(1000))
  
  Possible actions:
  1: abort (with core dump, if enabled)
  2: normal R exit
  3: exit R without saving workspace
  4: exit R saving workspace
  Selection:
  </code></pre>
  
  <p>Here is the information from sessionInfo()</p>
  
  <pre><code>    &gt; sessionInfo()
  R version 2.11.1 (2010-05-31)
  x86_64-unknown-linux-gnu
  
  locale:
   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C
   [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
   [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
   [9] LC_ADDRESS=C               LC_TELEPHONE=C
  [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base
  
  other attached packages:
  [1] rgl_0.92.798
  </code></pre>
  
  <p>This is from the sysname command</p>
  
  <pre><code>x86-64_linux_2.6.16_ImageSLES10SP3-3
  </code></pre>
  
  <p>Some more info:</p>
  
  <p>I am able to generate a surface plot from some code in <a href="https://stackoverflow.com/questions/3979240/r-plotting-a-3d-surface-from-x-y-z">R: Plotting a 3D surface from x, y, z</a></p>
  
  <p>Here is the code</p>
  
  <pre><code>x &lt;- seq(-10, 10, length.out = 50)
  y &lt;- x
  rotsinc &lt;- function(x,y) {
      sinc &lt;- function(x) {
          y &lt;- sin(x)/x;
          y[is.na(y)] &lt;- 1;
          y
      }
      10 * sinc( sqrt(x^2+y^2) )
  }
  z &lt;- outer(x, y, rotsinc)
  
  surface3d(x, y, z)
  </code></pre>
  
  <p>I tried demo(rgl) and that is also crashing with similar message. I want to generate 3d plots, which other package do you recommend? ggplot?</p>