Announcement

Collapse
No announcement yet.

Centroids of 2d arrays continued...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Centroids of 2d arrays continued...

    Hi there,

    you might remember my post (courtesy of my good friend paddy) concerning finding the centroid of a 2d shape. (see a couple of weeks back on this forum). Im currently trying to develop a program in IDL to do this, and im getting there. (Thanks to those who helped with the maths, btw). I opted out of centroids of weighted triangles, instead going for the same sort of idea with lines.

    Anyway, there seems to be a routine built into IDL that does this, but i cant get it working. The ROI creation tool works fine with my arrays, but the computegeometry::centroid routine doesnt make sense. It seems to output a 0 or 1 to denote sucess or failure (fine,ok), but the (very vauge) explanation of the centroid output seems to imply a single value output.

    Now, call me stupid but it thought points on 2d axes were supposed to have 2 coordinates, not 1. The routine listings are total crap and are no help.

    Being a physics student and not a computer scientist, im stuck. I also suspect that my syntax is wrong. ANY help anyone can give me would be most appreciated.

    Im convinced IDL was just made to annoy people...

    Thanks
    Last edited by jonnylane; 6 April 2003, 05:06.
    I hate flankers...

  • #2
    Another new recruit. Someone fetch the branding iron!

    As you know I can't help you, but I am sure that someone here will be able to.

    Good luck, and welcome.

    *edit*

    btw, the previous thread is here.
    Last edited by Paddy; 6 April 2003, 02:24.
    The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England

    Comment


    • #3
      ok everyone, crisis averted. Ive finally managed to get it working.

      If anyone needs to slove this problem in the future, im your man!

      I hate IDL.
      And Fortran
      AND Java...
      I hate flankers...

      Comment


      • #4
        Good job Jon!

        I like your sig!
        The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England

        Comment

        Working...
        X