I am trying to generate around 10-20 points on the xy- plane in the domain $[-10,10]\times[-10,10]$ (in 3D) and I am having trouble. I want to draw the plane in 3D, graph the random (they do not have to be random but at least nicely dispersed) points, and then graph vertical lines through these points. I found this How to generate random points in a region? and tried to adopt it for a plane in 3D but since i am very new to Mathematica I cannot seem to make it work. I am aware of the RandomPoint command but the problem is i need to describe the region and I do not know how to describe the region of xy-plane. I tried z=0 but I think it only accepts "worded" regions.
Any help would be appreciated.
RandomPoint
, there'sImplicitRegion
:RandomPoint[ ImplicitRegion[Abs@x < 10 && Abs@y < 10 && z == 0, {x, y, z}], 100]
will give you 100 points in the specified region. Alternatively, you could also generate points in 2D usingRandomReal[10,{100,2}]
and add the z coordinate usingAppend[0]/@pts
$\endgroup$