diff --git a/procedural-placement/Assets/PointGeneration.cs b/procedural-placement/Assets/PointGeneration.cs new file mode 100644 index 0000000..67394d5 --- /dev/null +++ b/procedural-placement/Assets/PointGeneration.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using UnityEngine; + +public class PointGeneration { + public static List random_sampling(int numPoints, Vector2 range, Vector2 offset) { + // Create a new empty list of points, and add some randomly + List points = new List(); + for (int i = 0; i < numPoints; i++) { + points.Add( + new Vector2( + Random.Range(-range.x, range.x), + Random.Range(-range.y, range.y))); + } + + return points; + } +} \ No newline at end of file