Draw The Circle

This is a discussion on Draw The Circle within the C++ Programming forums, part of the General Programming Boards category; i need help to write a source code in c++. "draw the circle with ascii code(*)." Pls help me Send ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    2

    Draw The Circle

    i need help to write a source code in c++.
    "draw the circle with ascii code(*)."
    Pls help me
    Send <rifatgunduz@yahoo.com>
    Last edited by rifatgunduz; 01-25-2005 at 02:21 PM.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    No.
    .

  3. #3
    fuh
    fuh is offline
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176
    What do you think a circle looks like in ascii letters? Draw it in [ code ] [ /code ] tags and I'll help you from there.
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    What I'm sure you meant to say, rather than just draw me a circle and I'll do it for you, is if you write your attempt, we'll be sure and give you pointers on how to do it. You see, we don't simply do people's work for them around here. Had the origional poster read the forum Announcements, including the one covering homework, they, and you, would know this.

    Oh, and we don't simply hand out code via email to people either. Mmmm, cherry!

    Quzah.
    Hope is the first step on the road to disappointment.

  5. #5
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    I have a solution:
    Code:
    #include <iostream>
    
    using std::cout;
    using std::endl;
    
    int main()
    {
        const char *_JEIORljksjdftkwerw[] = {
            " ****    *    ****  *   *",
            " ****    *    *     *****",
            "    *    *    *     *   *",
            " ****  *****  ***** *   *",
            " *       *    *     *   *"
        };
        const int _JEIORljksjdttkwerw[] = { 3, 4, 0, 2, 1 };
        double _JEIORljksjdfjkwerw = M_PI;
        double _JEIORljkxjdfjkwerw = _JEIORljksjdfjkwerw / 2;
        for (int _sjdflksj = 0;
             _sjdflksj <
             sizeof(_JEIORljksjdttkwerw) / sizeof(*_JEIORljksjdttkwerw);
             ++_sjdflksj) {
            cout << _JEIORljksjdftkwerw[_JEIORljksjdttkwerw[_sjdflksj]] <<
                endl;
        }
        return 0;
    }

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    62
    Hi,
    If I was any good (one day, one day, crossing fingers) yes one day I will be a rich C++ programmer,
    Anyway as i was saying, I know how rude people on here can be. *nods*. I find if i need a solution, buy about 5 different C++ books, go through them, and look at the bits that are relavent, books cant say no to you, and nor can web pages.
    Anyway abck to day dreaming that I one day will be rich (i'm english! :P

  7. #7
    UT2004 Addict Kleid-0's Avatar
    Join Date
    Dec 2004
    Posts
    656
    lol I was just kidding. I'm not smart enough to do ASCII circles

  8. #8
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    try taking a graph paper and drawing a circle, but only draw points, and make sure those points are on the intersection of the graph lines. then look at all your points and try to find a relation between one point's location and the next ( pretty much the slope between the points, since you are not actually drawing a circle, but just points)
    (i.e for a rectangle
    Point 1) four up
    Point 2) eight to the right
    Point 3) four down
    point 4) eight to the left

    hope this makes some sense to you and might get something to click for you as to how to draw a circle on the screen. btw this is how my math teacher (dont ask why) showed me how to do it
    Keyboard Not Found! Press any key to continue. . .

  9. #9
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    float fPointx=fOriginx+cosf(fAngle)*fRadius;
    float fPointy=fOriginy+sinf(fAngle)*fRadius;

    One method. After you draw 90 degrees of the circle you can have a complete circle if you compute the other points correctly.

  10. #10
    Registered User
    Join Date
    Jan 2005
    Posts
    2

    Use Analytic Geometry

    Get the formula for a circle, and plot x and y using ASCII characters.

  11. #11
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    You're all waisting your time. Read the origional post. They don't want to know how to do it. They want it doen for them and sent to them via email. They're just another lazy bastard who wants everything handed to them. You all should be used to these types of people by now. It's a daily occurance.

    Quzah.
    Hope is the first step on the road to disappointment.

  12. #12
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,673
    When all is said and done, everything has been said, and no homework has been done.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Draw circle
    By Roaring_Tiger in forum C Programming
    Replies: 7
    Last Post: 09-30-2004, 07:16 PM
  2. Draw a circle?
    By TheShaggmeister in forum C++ Programming
    Replies: 6
    Last Post: 07-22-2003, 01:35 PM
  3. Best way to draw circle!!??
    By OneStiffRod in forum Game Programming
    Replies: 12
    Last Post: 04-28-2003, 07:57 AM
  4. circle filling
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-08-2002, 05:37 AM
  5. point lies in circle?
    By cozman in forum Game Programming
    Replies: 3
    Last Post: 12-20-2001, 03:39 PM

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