1
$\begingroup$

I want to generate a plot that shows a rectangle populated with dots, where the dot-to-dot distance (pitch) distribution is a lognormal (or a gaussian). I want to be able to change the mean dot-to-dot distance and also the sigma. I started with the line below, which generates randomly placed points.

Graphics[{White, Rectangle[{-2, -2}, {2, 2}], Black, 
  Point /@ RandomReal[{-2, 2}, {4000, 2}]}, 
 PlotRange -> {{-2, 2}, {-2, 2}}] 

enter image description here

The following line seem to generate a normal distribution for the dot location in the square instead of normalDistribution of the dot-to-dot distance.

Graphics[{White, Rectangle[{-2, -2}, {2, 2}], Black, 
  Point /@ RandomReal[NormalDistribution[], {4000, 2}]}, 
 PlotRange -> {{-2, 2}, {-2, 2}}]

enter image description here

I'd really appreciate some help. Also in the lines above, I set the number of dots to 4000, but I guess the number must depend on the Rectangle size and the mean dot to dot distance.

$\endgroup$
6
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$
    – bbgodfrey
    Commented Jan 22, 2015 at 21:18
  • 1
    $\begingroup$ Putting aside the issue of how to do this in Mathematica, do you know how do distribute the points mathematically? $\endgroup$
    – bbgodfrey
    Commented Jan 22, 2015 at 21:20
  • $\begingroup$ What is the "dot to dot" distance? The distance from a dot to its nearest neighbour or to all other dots? $\endgroup$
    – Simon Woods
    Commented Jan 22, 2015 at 21:58
  • $\begingroup$ I'm pretty sure the questioner means the distances between every possible pair of dots. Note, though, that this distribution can never be Gaussian, since a Gaussian always has probability mass at negative values. $\endgroup$
    – David G. Stork
    Commented Jan 22, 2015 at 22:01
  • $\begingroup$ I am going to migrate this question to Mathematics. If and when you have an algorithm you wish to implement please post here again and we will help if we are able. $\endgroup$
    – Mr.Wizard
    Commented Jan 23, 2015 at 0:08

0

You must log in to answer this question.