title: Adding point and lines to 3D scatter plot in R
body: <p>I want to visualize concentration ellipsoids in 3d scatter plot in respect of principal components (principal components as axes of these ellipsoids). I used function scatter3d with option ellipsoid = TRUE </p>
  
  <pre><code>data3d &lt;- iris[which(iris$Species == "versicolor"), ]
  
  library(car)
  library(rgl)
  scatter3d(x = data3d[,1], y = data3d[,2], z = data3d[,3],
        surface=FALSE, grid = TRUE, ellipsoid = TRUE,
        axis.col = c("black", "black", "black"), axis.scales = FALSE,
        xlab = "X1", ylab = "X2", zlab = "X3",  surface.col = "blue",
        revolution=0, ellipsoid.alpha = 0.0, level=0.7, point.col = "yellow", add=TRUE)
  </code></pre>
  
  <p>to draw this plot:</p>
  
  <p><img src="https://i.stack.imgur.com/7yz4n.png" alt="enter image description here"></p>
  
  <p>Then I was trying to add "mean point" using</p>
  
  <pre><code>points3d(mean(data3d[,1]), mean(data3d[,2]), mean(data3d[,3]), col="red", size=20)
  </code></pre>
  
  <p>but this point is not in the place it's supposed to be (in the center of ellipsoid):
  <img src="https://i.stack.imgur.com/54sBx.jpg" alt="enter image description here"></p>
  
  <p>and I'm wondering why and how can I rescale it (?). And another question, which will arise after this how can I add axes of this ellipsoid to the plot?</p>