Results 1 to 3 of 3

Thread: 3d Graphing Program

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Wa, USA
    Posts
    3

    3d Graphing Program

    Hello, I'm trying to make a 3d graphing program, but I've ran into a little snag. I an't seem to fix one of the littler problems, the graphing itself. I have it set so a user can enter a formula, and if my math parser works, graph. The program gives an exact approximation of the vertices, and then puts garbage on my screen. I want to see a bunch of irregular tetragons, like on a Ti-89 calculator, but none of my quads are connected. Other than that, it forms the shape accurately enough. Eventually this will have polar, function, 3d-polar, parametric, and differential equations. I have riemann sums working well enough, but the actual graphs just sucks. I have (of course) x,y, and z coordinates in a large array, and would appreciate any help with with plotting code. Thanks!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    east norwalk, ct, usa
    Posts
    184

    Re: 3d Graphing Program

    Bill,

    You won't get the answer you're looking for by posting in this manner. You need to pare down your problem-code to show just what's relevant here, and post that. You might also describe what a tetragon is (I've never heard of it anyway). Further, if you've got some web page space from your ISP, you might even post a link to a screenshot of what you're output looks like.

    Good luck.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    Wa, USA
    Posts
    3

    Re: 3d Graphing Program

    Well, I figured out how to get all of the vertices into an array and to draw a good graph. It will graph with lines and irregular tetragons (A figure with four non-congruent sides.) Now I've encountered a new problems. The user can input the xmin, xmax, ymin... variables, the resolution of the grid, and a formula. I can get the window to size itself with glOrtho, but I can't seem to get that to work with other GL commands that rotate the graph so you can view it at an angle. When I use things like glRotatef, it appears to (eventually) become asymptotic to something, as it begins to go back and forth rapidly. As for actual code, all I need is someway to use glOrtho in conjunct with something like gluLookat or whatever. My mouse-rotate code is really messed up, but for now I'll assume I can fix that with OpenGL tutorials that I've seen. Thanks.

Similar Threads

  1. Graphing kit
    By PearDeveloper in forum OpenGL: macOS
    Replies: 2
    Last Post: 02-16-2010, 02:02 PM
  2. 3D Graphing (pie and bar chart)
    By jesse79 in forum OpenGL: General
    Replies: 0
    Last Post: 03-05-2004, 02:13 AM
  3. Simple 3d Graphing Program
    By rpminihan in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 10-16-2002, 10:45 AM
  4. Graphing program
    By HairyBill in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-02-2002, 06:41 AM
  5. Graphing
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-28-2000, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean