+ Reply to Thread
Results 1 to 5 of 5

Thread: find tan(angle)

  1. #1
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default find tan(angle)

    Registered forum members do not see this ad.

    how to find tan of angle in lisp
    my code

    tanA= x/y
    i know A and x
    how to get y ?
    help me.

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    2,986

    Default

    So, you know the angle and the oposite leg and look for adjacent leg?

    Code:
    (setq theY (/ theX (/ (sin theAngle) (cos theAngle))))
    Regards,
    Mircea

  3. #3
    Full Member
    Using
    AutoCAD 2009
    Join Date
    May 2011
    Posts
    70

    Default

    thanks,

    i did try it. but if angle is greater than 90 then how to find y?

  4. #4
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    2,986

    Default

    The above trigonometric formula works only in right-angled triangles - for your case need to split your current triangle in right-angled triangles and perform calculations in each to get the appropriate formula.
    Can you post a sketch of your case?

    Regards,
    Mircea

  5. #5
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    2,986

    Default

    Registered forum members do not see this ad.

    Or, if you know the size of triangle's third leg may use the cosine theorem.

    Regards,
    Mircea

Similar Threads

  1. Replies: 6
    Last Post: 13th Jul 2011, 02:19 pm
  2. 1st angle/3rd angle projection
    By Lazer in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 36
    Last Post: 30th Jun 2011, 02:09 pm
  3. Find Rotation Angle of a Block
    By SunnyTurtle in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 14th Apr 2011, 11:39 am
  4. Replies: 16
    Last Post: 4th Aug 2010, 02:42 pm
  5. How to find the angle between two points please?
    By facad in forum AutoCAD Beginners' Area
    Replies: 7
    Last Post: 7th Oct 2008, 01:16 am

Bookmarks

Posting Permissions

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