Results 1 to 10 of 10

Thread: [RESOLVED] Calculate point on cirlce

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Resolved [RESOLVED] Calculate point on cirlce

    I really suck at this, need help, dont even know what to search for.
    Look at the picture, its a circle there. The red lines goes from one end of the circle to the other, but i want them to stop at the black line..how can i achive this?
    Attached Images Attached Images  

  2. #2

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: Calculate point on cirlce

    Btw, the lines goes from the middle to 3/4 and 1/4 of the circle

  3. #3
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Calculate point on cirlce

    What values are given for you? The radius of the circle?, The starting points of the Lines? The angle betweeen the lines?, the length and position of the black line? and which line goes to 1/4 or 3/4 of the circle (radius, diameter or what)?

    Or shall we give you a drawing routine that erases everything outside your circle?
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  4. #4

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: Calculate point on cirlce

    Well..everything outside sounds nice But if that doesnt work, lets say the radius is 500 . The lines starts at circle.height / 2..Height of the circle equals the diameter (1000)

    The angle of the lines..well..now its just 1/4 and 3/4 from the top..dunno the angle

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Calculate point on cirlce

    sounds like you only know the end point of the red lines (Y-Value is 1/4 or 3/4 of the circles diameter and I guess the end value for the X-value is in both cases 0.)
    If the red lines shall end at the circle, the X-value can't be 0.


    Try it with some trigonometry.
    for the top line you have: Start point at (Diameter, Diameter/2) end point at (0, Diameter/4). The difference in Y-Value is Diameter/4, this value is 2*tan (Angle between Line and horizontal diameter of circle).

    Having got this angle, you can calculate the sinus and cosinus to compute the corrrect values for the end points.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  6. #6

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: Calculate point on cirlce

    Opus...ehh, this is some of my problem. My skills in trigonometry is >0, so i need the formula

  7. #7
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Calculate point on cirlce

    Let me try just for the upper line:
    (diameter/4)/(diameter/2)=2*tangens(angle)
    1/4=tangens(angle)
    14,036°=angle
    for your circle with a diameter of 1000 (radius of 500)

    sin(angle)*diameter=242,532
    cos(angle)*diameter=970,144

    so your upper line starts at (1000;500) and goes to ((1000-970,144);(500-242,532))!
    I hope you can do the rest for the lower line yourself!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  8. #8

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: Calculate point on cirlce

    You've just saved my ass, thanks a lot Opus

  9. #9
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: [RESOLVED] Calculate point on cirlce

    If I've done your homework, the least you could do is rate my post!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  10. #10

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: [RESOLVED] Calculate point on cirlce

    Das ist getun Its done

Posting Permissions

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



Click Here to Expand Forum to Full Width