Results 11 to 20 of 43

Thread: Test Whether A Point Is In A Polygon Or Not

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Junior Member
    Join Date
    Mar 2016
    Posts
    2
    Rep Power
    0
    Hello,

    first of all, thank you for your code. Im an optical engineer, and i need to mesh a polygon (equally distribute points) to calculate the homogenity of the luminance at these points, this is why your code is helpful to me.

    However, i have a couple questions:

    • Code:
      Poly = Polygon
      why is this line needed? declaring an other variable seems to be unnecessary to me, can i use just polygon instead of poly?
    • Code:
      PtInPoly = CBool(NumSidesCrossed Mod 2)
      what is the exact purpose of CBool? NumSidesCrossed Mod 2 gives 1 or 0 (remember, PtInPoly is a variant, not boolean) which can be used as the condition input for IF, no need to make the code longer with CBoolean.
    • you mention that the first and last point of the polygon have to be the same. Since this is a _must_ condition, why not write the code in such a way, that the last point would be added as the first point. this way no error correction would be necessary, since the last point would be automatically copied from the first point.

    Last edited by qetuol; 03-14-2016 at 05:38 PM.

Similar Threads

  1. This is a test Test Let it be
    By Admin in forum Test Area
    Replies: 6
    Last Post: 05-30-2014, 09:44 AM
  2. This is a test of Signature Block Variable Dim
    By alansidman in forum Test Area
    Replies: 0
    Last Post: 10-17-2013, 07:42 PM
  3. Replies: 4
    Last Post: 06-10-2013, 01:27 PM
  4. Test
    By Excel Fox in forum Word Help
    Replies: 0
    Last Post: 07-05-2011, 01:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •