Announcement

Collapse
No announcement yet.

Quadrant Points

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

  • Quadrant Points

    Along the lines of my search to draw lines at angles, maybe a clean up on isle 4 is needed, but I had to ask.

    If I correctly understand, then I am used to grid coordinates like

    Code:
              0
              |
    270---|---90
              |
             180
    But graphics (Circle, oval, etcs) seem to use
    Code:
              90
              |
    180---|---0
              |
             270
    Which is fine and dandy, its just a simple rotation of begginning point (every point of view MUST have an origin)

    I also get that (Cos(angle), Sin(Angle)) should be the point on a circle around my start point (and quadrants sorta) but what I do not get, is when to use what formula relative to my start point.
    (For example 0,0....but should hold true if finding a point 1 away from 0, 0)
    Code:
              0    30                   90  60
              |  /                         |  /
              |/                           |/
    270---|---90           180---|---0
              |                            |
             180                        270
    30 and 60 are the same angle (as far as me figuring Cos, Sin for the point

    Can anyone simplify my complete confusion on points as to use COS(degree) vs COS("Negative"-Degree) vs "Negative"-COS(Degree) confusion???
    (aka, what function do I use for what quadrant????)

    sorry its so hard for me to define, but maybe some of you math majors out there can clean up my aisle 4 problem???

    Code:
           Sample Degree
                  \    Reference point
                   \  |
                    \ | 
    Quad II     \|     Quad I
    ------------------------------------ Reference point
    Quad III    |     Quad IV
                     |
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    gahhhh the cross-hairs will not match up...(But if you can see what I mean without them...or delete chars needed to make the crosshairs match up) you will see what I am asking.
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

    Comment


    • #3


      from, http://en.wikipedia.org/wiki/Trigonometric_functions

      Comment


      • #4
        Cliff:

        May be this helps
        Attached Files

        Comment


        • #5
          This animated gif - linked to from the page that Brad posted - is very nice too!




          That should be a snap to reproduce with PB's graphic statements

          PS in case you didn't memorise the tables 'back then' ..
          Code:
          #Dim All 
          #INCLUDE "WIN32API.INC"
          Macro Pi   = 3.141592653589793##
           
          Function PbMain()
           Dim sTest$, L!
            For L = 0 To 360 Step 5
           
            sTest = sTest + "SIN" + str$(L) + $Tab + Format$(Sin(L*Pi/180), "0.0000") + $Tab + _
                            "COS" + str$(L) + $Tab + Format$(Cos(L*Pi/180), "0.0000") + $CR
           
            Next
           
            MsgBox sTest,,"Result"
           
          End Function
          Attached Files
          Last edited by Dave Biggs; 11 Apr 2009, 04:34 AM. Reason: External link for pic
          Rgds, Dave

          Comment


          • #6
            Cliff,

            The convention of 0 being at "East" and degrees running counter clockwise has been long established in computing. As you know though this is opposite and rotated from compass angles. I really got into it with CAD using this back in the '80's on DOS based programs. It carried over into windows. Fortunately one can use the floating point processor (with in-line assembler) to simplify things where you want to easily go between rectangular and polar coordinates. You can do things as others pictured by checking quadrants etc to select whether you want to use this or that trig function. The key though is thinking in radians since they are the natural unit underneath all of it for computer processes.
            Rick Angell

            Comment


            • #7
              Happy Easter All

              Well it took a Easter trip home and a 2 second description to my dad (yes I had to go home and ask daddy) of where my confusion was coming into play. (He is a Civil Engineer Professor, and can do this kind of math in his head)

              Almost immediately he could explain that I was over-thinking things. And to a lesser point how math classes were my problem (much like it was when I took the class)

              AKA: trying to refer to a rule as a rule and its the ONLY rule, which does not hold true in all cases....it only holds true in the case of the scope you are using it.

              In my case would be forget 0 is at the top and realize it is to the right. Then go counter clockwise and all COS, SIN handle themselves.

              Basically all units must match if you are to result in correct answers.

              (Same trap I had with Trig and hanging a wire....in trig I had exact decimal points, in actual use if the wire was too short, I use it on another project, if too long, I trim the decimal point)

              Just like in electronics, sure mathematically I could calculate to a precise answer. But in practicality someone show me a resistor that is a precise value and not +- some percentage????
              Engineer's Motto: If it aint broke take it apart and fix it

              "If at 1st you don't succeed... call it version 1.0"

              "Half of Programming is coding"....."The other 90% is DEBUGGING"

              "Document my code????" .... "WHYYY??? do you think they call it CODE? "

              Comment


              • #8
                Cliff,

                Your first example (with 0 pointing north) pretty much describes a cartesian coordinate system where angles are generally measured clockwise, commonly referred to as a left-handed system. This coordinate system is used in the design of highways and cartographic applications for example. Oddly enough the usage of SIN and COS pretty much follows the counterclockwise (right-handed) system except the usage is reversed for calculation purposes, COS for SIN, etc.

                Are you working in 2D or will you be expanding into 3D?
                Later...

                JR

                "When governments fear the people there is liberty. When people fear the government there is tyranny." - Thomas Jefferson

                Comment

                Working...
                X