|
-
Jan 17th, 2009, 01:15 AM
#1
Thread Starter
Hyperactive Member
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
-
Jan 17th, 2009, 02:03 AM
#2
Hyperactive Member
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:
'Use: CreateArc(e.graphics, 10, 10, 20, 30, 130) '130 is radius or 3rd point Private Sub CreateArc(ByVal gr As Graphics, byval StartPoint as PointF, EndPoint as PointF, Radius as single) 'Code to Set, Calculate and Draw an arc End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|