Thread: graphing a parabola

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    2

    Wink graphing a parabola

    i'm planning to make a program that will solve for the parabola of a given equation but i don't know how to output it?
    is there a function in C++ that will allow you to draw a graph of a parabola?

  2. #2
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    in simple no. if you are programming for windows you can use gdi for this. just use the equation to plug in values and plot the points and then connect them with a line, the smaller you increment the values to plug in the more natural your parabola will look.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    oh, you mean like the ToParabola() function?
    I don't think so.
    Basically you must output your calculations using some GDI API, or else you can download the DirectX Development kit, for instance, which will actually have such high-level facilities available to you.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    you can do it in ascii using strictly standard functions, if you really wanted to.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C programming - parabola. HELP!!!!
    By compincompetent in forum C Programming
    Replies: 1
    Last Post: 10-19-2007, 01:22 PM
  2. Open source graphing / plotting library?
    By sysop in forum C Programming
    Replies: 2
    Last Post: 06-05-2007, 12:20 PM
  3. Graphing a sine/cosine/tan curves in C???
    By Brokn in forum C Programming
    Replies: 3
    Last Post: 12-13-2005, 03:36 AM
  4. Graphing Calculator..
    By willc0de4food in forum Windows Programming
    Replies: 12
    Last Post: 09-26-2005, 06:57 PM
  5. Graphing Calculators
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 11-17-2003, 08:23 AM