POV-Ray : Newsgroups : povray.general : Help with triangle dilema. : Re: Help with triangle dilema. Server Time
13 Aug 2024 21:17:54 EDT (-0400)
  Re: Help with triangle dilema.  
From: Jamis Buck
Date: 8 Jun 1998 09:37:32
Message: <357BE91C.8808AD7F@cs.byu.edu>
Hmmm.  This isn't a solution really, but maybe something to lead you to
one?  Since any triangle may be divided into two right-triangles, maybe
you could do that.  With a right triangle, its a simple matter of
trigonometry to figure how far a point is from the vertical "stem" given
the hieght along the stem, ie:
    
                  /|
                 / |
  this point->  /  | <- at this height
               /   |
              /    |
             /_____|

Then you could position the sphere randomly between the "stem" and the
hypotenuse.

Hmm.  A thought, anyway.

- Jamis Buck
  buc### [at] csbyuedu

Nathan O'Brien wrote:
> 
> Hi all.
> 
> I'm looking for a way to distribute spheres randomly on the surface of a
> triangle so that no sphere centre lies outside the confines of the
> triangle. The triangle may be any 3 points. The next bit is that I would
> like to do this using only POV 3.0 code. Any help is greatly
> appreciated.
> 
> --
> regards
> 
> Nathan O'Brien
> no1### [at] no13net
> http://www.no13.net


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.