Return a random point from the non-empty PointVector
| 33 | |
| 34 | // Return a random point from the non-empty PointVector |
| 35 | Point choose(const PointVector& points) { |
| 36 | return points[randrange(points.size())]; |
| 37 | } |
| 38 | |
| 39 | // This is a function to simulate a "chaos game" |
| 40 | PointVector chaosGame(int numOutputPoints, const PointVector& inputPoints) { |