Board index » delphi » Random 3d point inside a 3d triangle
Earl F. Glynn
Delphi Developer |
Sat, 25 Jan 2003 03:00:00 GMT
Random 3d point inside a 3d triangle
Paul:
Quote"Paul Nicholls" <phan...@southcom.com.au> wrote in message news:3990dd19_2@dnews... http://www.deja.com/getdoc.xp?AN=544184485: "Let the points be (x0,y0,z0), (x1,y1,z1), (x2,y2,z2). Given (x,y), solve for s and t in (x,y) = So it looks like you could get a random point in this triangle by defining followed by t := (1-s)*Random; and then applying the above definitions to compute (x,y) from s and t, and -- Earl F. Glynn E-mail: EarlGl...@att.net efg's Computer Lab: http://www.efg2.com/Lab |