Drawing Circules in a Raw picture

This is a discussion on Drawing Circules in a Raw picture within the C Programming forums, part of the General Programming Boards category; I'm making a program to modifie a raw picture. I can already open it and write it sucessfully from and ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    21

    Question Drawing Circules in a Raw picture

    I'm making a program to modifie a raw picture.
    I can already open it and write it sucessfully from and to a file.
    What i need to know is how to write a circule. how can i implement that? i need to write a function that received the centre and distance to center and write it. can someone help me out?
    thanks in advance

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    I suggest reading into the bresenham algorithm and the midpoint algorithm, which are very fast for drawing lines, circles, ellipses and even arbitrary curves.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing bitmaps efficiently
    By scwizzo in forum Windows Programming
    Replies: 28
    Last Post: 06-30-2009, 09:25 PM
  2. Slow drawing code
    By tjpanda in forum Windows Programming
    Replies: 5
    Last Post: 05-09-2008, 06:09 PM
  3. [C] change picture width and height in Static control (no MFC)
    By pc2-brazil in forum Windows Programming
    Replies: 1
    Last Post: 05-05-2008, 02:17 AM
  4. Insert A Picture into C++
    By SweeLeen in forum C++ Programming
    Replies: 3
    Last Post: 03-07-2006, 05:52 AM
  5. Raw Sockets and SP2...
    By Devil Panther in forum Networking/Device Communication
    Replies: 11
    Last Post: 08-12-2005, 05:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21