Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7959881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:38:31+00:00 2026-06-04T04:38:31+00:00

How can I draw an elliptic arc with Java without using any standard graphic

  • 0

How can I draw an elliptic arc with Java without using any standard graphic libraries functions, like Ellipse() or Path()?
The closest idea of what I need to do is Elliptical Arc using Trigonometric Method, but it only shows random arcs, and that is not the way things should go.

The way I’m thinking of is: specify ellipse by two points, then specify angle, which will be cut from this ellipse (or vice versa).
For drawing ellipse I used Bresenham’s algorithm, but it can’t be used for arcs because of mirroring.
Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:38:32+00:00Added an answer on June 4, 2026 at 4:38 am

    You should look from parametric equations. For example, to draw a circle you should first know the circle formula:

    x^2 + y^2 = R^2

    where R is the radios of the circle.

    Now you should write this formula based on the angle (from 1 to 360). Based in a rectangle triangle inside the circle, its trigonometric formula will be:

    cos(t)^2 + sin(t)^2 = R^2

    where t is the angle, cos(t) will be X and sin(t) will be Y.

    So, to draw a circle, you need to pass just the radio of your circle:

    public static void drawCircle(int radio, double xCenter, double yCenter) {
        double t = 0;
        double xPoint;
        double yPoint;
        double xActual = xCenter;
        double yActual = yCenter + radio*sin(0);
        t += 0.01;
        while(t < 360) {
            xPoint = xCenter + radio*cos(t);
            yPoint = yCenter + radio*sin(t);
            //you should write this function based on
            //the platform you're working (Swing, AWT...)
            drawLine(xActual, yActual, xPoint, yPoint);
            t += 0.01;
            xActual = xPoint;
            yActual = yPoint;
        }
    }
    

    You should review the parametric formulas of the figures you need to draw:

    Ellipse

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any idea how I can draw Bullet Points using Flex? instead of using image
How Paint .NET can draw so fast using C#? Sample: The ellipse perimeter is
I have a program written in Java using JOGL with which you can draw
Using SVG path, we can draw 99.99% of a circle and it shows up,
Is there any free library available using which I can draw bar graphs in
I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
How I can draw a Pascal's triangle in PASCAL Programming like a diamond from
I can draw a hyperlinked shape in tikz using the following code: \documentclass{article} \usepackage{tikz}
the pixman image library can draw radial color gradients between two circles. I'd like
ok i can draw ellipse the problem is this, im trying to draw one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.