c++ 3D plots

Hi

does anyone any good 3D plotting functions, which accepts x,y and z value, which i can use in c++, i want to be able to rotate the plot as well.

thanks
I am working on an extended Maths library which includes some basic function that may be of use to you, is quite experimental but you're welcome to take a look if you like?
If you inbox me your email I can send you the actual files rather than a huge code dump here.

Preview:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace SB{
    namespace Maths{
        template<typename T> T* orderSL(int number, T var[]) //Orders array small to large
        template<typename T> T* orderLS(int number, T var[]) //Orders array large to small
        template<typename T> T* orderReverse(int number, T var[]) //Reverse order of an array
        template<typename T> void swar(T* var1, T* var2) //Swaps values of two identical types

        //Most of these are self explanatory
        double toDegrees(double radians);
        double toRadians(double degrees);
        double toBearing(double degrees);
        double fromBearing(double degrees);
        double rectifyAngle(double degrees, bool ABS = false); //limits an angle to (-PI & PI) or if ABS is true (0 & 2PI)

        //rotates point about (0, 0, [0]), by radians
        void rotatePoint(double* point[2], double radians);
        void rotatePoint(double* point[3], double radians[3]);

        //These are functions found on the Casio FX-83 GT... XD
        double polR(double x, double y); //Finds radius of (x, y) from (0, 0)
        double polT(double x, double y); //Finds angle of (x, y) from (0, 0)
        double recX(double radius, double theta); //Finds x length of [r, t]
        double recY(double radius, double theta); //Finds y length of [r, t]

        //No explanation of top 2 needed hopefully
        double pythag(int num, double roots[]);
        double average(int num, double sums[]);
        bool pRange(double exp, double tru, double range, bool ABS = false); //Tests if exp is within %<range> of tru, if ABS will only return for positive comparison
        bool vRange(double exp, double tru, double range, bool ABS = false); //Same as above but uses a +/- comparison rather than % range
    }
}
Last edited on
doesn't c++ have any plotting functions, i have to stay from externally built functions.

opengl can only be used once in terms of you can't leave that loop to go to the next opengl loop.

so would like a graph plot
Not exactly sure what you meant by most of that but I'm pretty sure that C/C++ doesn't include anything for handling data to do with graphs. And as far as I'm aware OpenGL and Direct3D only include the actual functions and data structs required for drawing.

I suppose you'll either have to make your own Library or use someone elses, if mine is no use to you try take a look on code.google.com
Last edited on
Take a look at this: http://mathgl.sourceforge.net/

It may be what you're looking for.
when ever i type i always seem to miss out words as i am also saying it in my head as i write it so i miss it out without even realizing.

mathgl looks good.

thanks will have a look
asda333 wrote:
when ever i type i always seem to miss out words as i am also saying it in my head as i write it so i miss it out without even realizing.


So does everybody, try previewing your post and proof-reading what you write before submitting it if that's a recurring issue.
Topic archived. No new replies allowed.