so here is my really lame random number script to generate X,Y,Z coordinates to create a point cloud. i wanted it to be as random as possible, but it really comes out way to even.
<?
// starting point for loop count
$loop_start = '0';
// setup number of point sets to generate
$num_of_points = "100";
while ($loop_start <= $num_of_points) {
// generate random numbers for point cloud
$random1 = rand(0, 1000);
$random2 = rand(0, 1000);
$random3 = rand(0, 1000);
$random4 = rand(0, 1000);
$random5 = rand(0, 1000);
$random6 = rand(0, 1000);
$point1 = rand($random1, $random2);
$point2 = rand($random3, $random4);
$point3 = rand($random5, $random6);
// echo points to screen
echo "$point1,$point2,$point3 <br/>";
// increase loop count
$loop_start++;
}
?>
the distribution of points in the field is way to even. i want it to be denser in some places and open in others. can somebody help me make my random points more random and less evenly spread out in the field. thanks!