Results 1 to 2 of 2

Thread: Draw Arc from Start point, End point and Radius

  1. #1

    Thread Starter
    Hyperactive Member cptHotkeys's Avatar
    Join Date
    Apr 2007
    Location
    New Zealand
    Posts
    294

    Draw Arc from Start point, End point and Radius

    I want to make a drawing application which needs a few drawing functions I cant handle myself as im not very mathematicly inclined so any help will be appreciated.
    The first on the list of functions is to create an arc from a start point, end point and radius.
    The method signature is as followes.
    Code:
    Function CreateArc(byval StartPoint as PointF, EndPoint as PointF, Raduis as single) As PointF()
        'Code to create an array of points...
        return ptPoints()
    End Function
    I know this has a place in the maths forum but Im hoping someone has the code already...
    Im also hoping that the function could also draw a full circle by supplying the same start and end points.
    Thanks in advance

    Signatures suck

  2. #2
    Hyperactive Member Zeljko's Avatar
    Join Date
    Oct 2006
    Location
    Internet
    Posts
    441

    Re: Draw Arc from Start point, End point and Radius

    Look here (these guys are realy putting big effort in it):
    Code:
    Draw an arc from two points and radius:
    http://www.programmersheaven.com/mb/VBasic/342554/342554/draw-an-arc-from-two-points-and-radius/
    
    Some formulas for this kind of arc on another Math forum (Yeti post):
    http://www.mathlinks.ro/Forum/viewtopic.php?p=644880#644880
    And for yours Function i think that you first need to make it like this:
    Vb.net Code:
    1. 'Use:
    2. CreateArc(e.graphics, 10, 10, 20, 30, 130)  '130 is radius or 3rd point
    3.  
    4. Private Sub CreateArc(ByVal gr As Graphics, byval StartPoint as PointF, EndPoint as PointF, Radius as single)
    5.     'Code to Set, Calculate and Draw an arc
    6. End Sub
    1. If this post helped you, please Rate it = That's You, saying Thanks, to Me ...Left side of this post: [Rate this post]
    2. Mark this Thread Resolved if your question has been answered That's You, saying Thanks, to Group ...Menu on top of your original Post: [Thread Tools]>[Mark Thread Resolved]
    3.
    Check my site: www.er-ef.netCheck my snippets: Get installed .NET versionsRegex extractingJoin hierarchically nested Datatables in one flattened Datatable


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