Re: Random points in triangle

*To*: mathgroup at smc.vnet.net*Subject*: [mg111654] Re: Random points in triangle*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Mon, 9 Aug 2010 05:13:18 -0400 (EDT)

On 8/8/10 at 7:21 AM, stevebg at ROADRUNNER.COM (S. B. Gray) wrote: >Bill, Thank you for your careful reply. I will consider what you >say. In the meantime, if you run the code I sent, you will see that >the triangle is filled with a pretty good uniform distribution. >Visual uniformity is really all that I need, not any statistical >tests. If you are getting a result that satisfies your needs, great. Certainly, there are solutions that will not meet statistical tests for uniformity that appear to be visually uniform. And if all you need is the appearance of being uniform, there is clearly no need to worry about meeting any statistical test. But if you are using this as a basis for computing something else and need confidence limits on the answer you can find yourself significantly mislead if you rely on just the visual appearance. >Another factor is that I have convex 3D polyhedra to be >filled "uniformly." It turns out that the Gamma distribution does a >decent job with a good setting of the first parameter; the more >points there are in the convex polyhedron, the lower that parameter >should be for good uniformity. (There is one weight, 0<wts<1, per >vertex and the resulting point is always inside the polyhedron.) One of the advantages of using the approach I suggested is there is no need to "tune" the parameters of the algorithm for different shapes. All that is needed is a suitable definition for inside/outside of the particular shape you want to use. >The purpose for the random internal points (and random convex >polyhedra) is to test a conjecture that I thought of. The conjecture >has to do with the angles between the n rays from a random point inside >the convex polyhedron to its n vertices. There are n(n-1)/2 angles >between pairs of rays and the conjecture is that at least n-1 of them >must be obtuse. This may be easy or difficult to prove - I don't know, >and if you have any ideas I'd be glad to hear them. =46or this purpose, you probably don't even need something that is visually uniform. All you really need is to ensure the points are interior points and the algorithm you use has some probability of choosing any interior point. If your algorithm chooses say edge points less often than strictly interior points, all you would need to do is increase the number of random points selected to ensure some edge points are selected. But there is a potential problem if you either choose an algorithm that is not visually uniform or only insist on the appearance of uniformity. It is more difficult to be certain such an algorithm will not overlook special cases. The more complex the algorithm is, the more difficult it is to analyze to determine whether all important cases are considered. In your algorithm, you start with values selected from an exponential distribution which is unbounded. Then you do a series of computations to get a weight which will have a beta distribution which is bounded. While it should be possible to work out the bounds for the weight value you use, it clearly is not immediately obvious what the bounds for this variable are. And that makes it hard to immediately see if your algorithm is doing what you intend.