Results 1 to 3 of 3

Thread: draw minor arc

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Smile draw minor arc

    Dear Friends
    Please give me an algorithm how can I draw the minor arc with centerX, center Y , radius, startAngle and endAngle. Please help me some one. I need to get the points for the minor arc, not the major arc. Thanks a lot in advance. Sujan

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: draw minor arc

    Points of the arc are the solution of a x^2+y^2 = r^2 equation assuming origin of the circle is in the point (0,0). Use trigonometic functions to determine the starting and ending point of the arc.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: draw minor arc

    Or: use the polar form of the circle equation.

    Or: use the parametric form.

    Or: use Bresenham's Algorithm.

    All have advantages over the Cartesian formula in terms of efficiency and drawing partial, specified arcs.

Similar Threads

  1. Replies: 10
    Last Post: 11th February 2011, 00:31
  2. Grid Minor Major and gap before the data
    By huseyinkozan in forum Qwt
    Replies: 3
    Last Post: 3rd August 2010, 13:13
  3. Minor bug in QMdiArea/QSubMdiWindow: Ctrl+Shift+Tab
    By epsilon in forum Qt Programming
    Replies: 0
    Last Post: 3rd March 2010, 07:23
  4. QComboBox minor problem
    By lalesculiviu in forum Qt Programming
    Replies: 2
    Last Post: 12th December 2009, 17:50
  5. How to draw a arc
    By ProTonS in forum Qt Programming
    Replies: 3
    Last Post: 9th September 2009, 16:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.