In Scala Plotly, how to (correctly !) draw something in 3D?

I have a Seq[Seq[Double]] object, which is a sequence containing points in 3D (the size of the Seq[Double] is 3).
I can transform this into a Seq[ Seq[Double] , Seq[Double] , Seq[Double] ]. The inner first Seq[Double] contains the x-coordinate of each of the points, the next contains the y, the last the z.
I can use either the first way to represent a point, or the second I just explained. It’s whatever you want.

My question is : how to give these points to Plotly please ? In Scala.

I looked for it and I tried : ThreeDPlot().withSurface(my_points) with the Seq[Seq[Double]] solution (i.e. the first I explained to you). BUT the problem is that Plotly seems to draw whatever.

Indeed : is what I obtain for a square :

val points : Seq[Seq[Double]] = Seq[Seq[Double]](
  Seq[Double](0, 0, 5),
  Seq[Double](0, 4, 5),
  Seq[Double](4, 4, 5),
  Seq[Double](4, 0, 5)

(Corresponding chart : ).

By the way, it seems to be impossible to use a 3D Scatter (for the moment I am using a ThreeDPlot.withSurface, which is not a 3D Scatter).