Skip to content

Implement a ray-casting function approach #11

@bjlange

Description

@bjlange

A la this: http://ncase.me/sight-and-light/

We could build polygons by doing this:

  1. pick a point
  2. do the raycasty funtimes
  3. pick a new point inside the raycast polygon (perhaps with a min/max side size)
  4. goto 2 (unless the first point chosen is reachable?)

Not sure how to do step 3 other than brute force.

Another idea: rather than sample after the fact, make a nicely spaced set of random points using Best-Candidate or Bridson's algorithm ahead of time. Then step 3 is just filtering all candidate points to ones inside the polygon/radius and picking from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions