Search:

Type: Posts; User: Nominal Animal

Search: Search took 0.05 seconds.

  1. There is absolutely no need to apologize! I just...

    There is absolutely no need to apologize! I just wanted to make sure that if there is any negativity in my post, it is because of a character flaw I have, not something I wanted to direct at anyone....
  2. Of course. My example code does not do that, as...

    Of course. My example code does not do that, as it's just an example of an one-off test.

    To achieve something like that, you need a state machine.

    You need to store the dog's status, and a...
  3. Yes, except it is constant for the entire...

    Yes, except it is constant for the entire polygon.

    Consider the following image:
    12060
    The green area is defined by 17 points, and is the actual polygon. In this region, polygon_distance() will...
  4. A few hours of research later, here's what I came...

    A few hours of research later, here's what I came up with:


    /* Return 0 if point is inside polygon.
    * Otherwise, return the minimum distance squared to the polygon.
    * The result is never...
  5. You know, that does sound easier. I'm starting to...

    You know, that does sound easier. I'm starting to think your approach is better, after all.

    Why not do a separate polygon for the warning area? Have your code check the safe area first. If the dog...
  6. Inches and acres, grumble.. Okay, that means...

    Inches and acres, grumble.. Okay, that means about a million samples, with each sample being about 6"×6" ≃ 0.15m×0.15m.

    MSP430 is 16-bit, so let's use something like 1" coordinate units -- you...
  7. Another approach you could consider, is creating...

    Another approach you could consider, is creating a bit map of the safe area (and another of the warning zone, if you want). Using S for set safe bitmask bits, W for set warning and safe zone bitmask...
  8. No, not substract. Multiply. You can shrink...

    No, not substract. Multiply.

    You can shrink any polygon by multiplying the coordinates by a constant. To reduce the size by 25%, you'd multiply by 75% or 0.75.

    Note that that will cause the...
  9. Doggie psychology. When the dog stops doing the...

    Doggie psychology. When the dog stops doing the unwanted thing, you want to immediately remove the "bad dog" signal.

    Assume the dog is at the boundary. If the dog is facing outwards, you could now...
  10. I'm with Oogabooga on this. It is much more...

    I'm with Oogabooga on this.

    It is much more efficient to map the yard using circles; just make sure they overlap. Consider the following:


    struct point {
    float x;
    float y;
    };
Results 1 to 10 of 10