Function G2(StartX, StartY, EndX, EndY, Radius)

Blitz3D Forums/Blitz3D Programming/Function G2(StartX, StartY, EndX, EndY, Radius)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

AH, that's cool then, because that had me scratching my head, and produced some funny results in blitz when the radius was set to less than half of LC.

That way i see it, is the curve is part of a perfect circle, and for that, it should be easy to draw :o) Notice from point PC to the point halfway across LC, to the radius start point, it's a right angled triangle.

You know the length of the radius, one side of the triangle, and you know the length of the other side, half of LC.

From that you should be able to calculate the length of the line stretching from the centre point of LC, to the start point of the radius. Now you know this, you have a start point to begin your curve. Work out the angle from the start draw point to PC and PT. From there, simple plot a line of points from those two angles.

for loop = start_angle to end_angle

plot cos(loop)*raduis,sin(loop)*raduis

next


Should do the trick. I'm at work again, so maybe i'll get home before stevie and beat him to it again :oP