Results 1 to 5 of 5

Thread: 3D chart

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Frankfurt, Germany
    Posts
    4

    3D chart

    Hi,

    I'm interested in 3D chart creation, and I have some 3D problem:

    my chart is a surface in space and the y axis is divided in 10 diferent region. So every points between two region have the same colour.

    The surface is formed from rectangles. So the problem is how to fill corect every rectangle?

    Thanks.

  2. #2
    Member Contributor bsperlin's Avatar
    Join Date
    Feb 2001
    Location
    VA
    Posts
    67

    Re: 3D chart

    Hi!
    Polygons are usually filled. Setting the alpha to less than 1 makes them partially transparent. Why won't your rectangles fill?
    Barry

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Frankfurt, Germany
    Posts
    4

    Re: 3D chart

    Originally posted by bsperlin:
    Hi!
    Polygons are usually filled. Setting the alpha to less than 1 makes them partially transparent. Why won't your rectangles fill?
    Barry
    You don't understand the problem....

    So, I must fill one rectangle with different colours, depending on the y values for the rectangle surface points.

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: 3D chart

    Just set the color of each vertex based on the y value and the colors across the quad will be interpolated. You can also use a 1D texture and base your texcoords on the height if you want custom colors.
    Deiussum
    Software Engineer and OpenGL enthusiast

  5. #5
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    186

    Re: 3D chart

    Just make sure that smooth shading is turned on.

    Chris

Similar Threads

  1. radar chart
    By elsanna in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-17-2014, 05:01 PM
  2. Cg chart
    By vivek vyas in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-09-2009, 08:28 AM
  3. 3-D Pie Chart
    By Thomas Alton in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-24-2009, 02:57 PM
  4. How to draw Pie Chart
    By efang in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-05-2004, 09:38 AM
  5. 3D chart
    By imported_Flavius in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 05-15-2001, 06:23 AM

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