Questions tagged [geometric-arc]

A geometric shape that represents a segment of a circle. Generally is measured by two angles, starting and ending, and it's radius. If you need an arc of an ellipse, please be sure to tag the question with the [ellipse] tag as well.

Geometric Definition:

An arc is a geometric shape used for drawing circle segments. It is comprised of three main parts:

  • staring θ: the angle measure, for the first part of the sub-circle, usually in radians
  • ending θ: the angle measure, for the ending part of the sub-circle, usually in radians
  • radius:     the radius of the circle that this arc is a part of.

Arcs in computer programming cannot be accurately represented, as the value of π is infinite. Thus, any circle or arc you see will always be slightly inaccurate, although most algorithms usually keep that with a few pixels.

The length of an arc can be approximated by the following formula:

       Arc Length Forumla

Notice that on some systems, the length of an arc can be negative, specifying that it moves counter-clockwise around the circle, instead of clockwise. This is usually represented by a flag being set from the calling function.

On Specific Systems:

For windows, arcs can be drawn using the functions, and can also draw arcs of ellipses.

Example in :

void drawArc(Graphics myGraphics, Pen myPen, float x, float y, float startTheta, float endTheta, float radius)
{
    myGraphics.DrawArc(myPen, x - radius, y - radius, radius * 2, radius * 2, startTheta, endTheta);
}

Arcs can also be drawing using the equivalent drawing functions.


For Mac OS X, arcs can be drawn using the NSBezierPath class in AppKit.

Example in :

void drawArc(float x, float y, float startTheta, float endTheta, float radius)
{
    NSBezierPath *bezierPath = [NSBezierPath bezierPath];
    [bezierPath appendBezierPathWithArcWithCenter:CGPointMake(x, y) radius:radius startAngle:startTheta endAngle:endTheta];
    [bezierPath stroke]; // draws with current set color
}

In Java, you can draw arcs as well, using the portable functions found in the Graphics class.

77 questions
-2
votes
1 answer

How can I find the steepest point of curve or the arc of the curvature?

Given the curve I just have the (X,Y) coordinates of the curve, I want to find the steepest point of this curve or the arc length (starting and ending point of the arc)
-4
votes
2 answers

animated Geometric effect like ie logo

I want animated Geometric effect like ie logo (yellow color) which moves around my logo.
Ganesh Yadav
  • 2,607
  • 2
  • 29
  • 52
1 2 3 4 5
6