Problems with drawing openGL 3D charts

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Problems with drawing openGL 3D charts

Post by bairog » Thu Nov 30, 2006 2:18 pm

I'm drawing openGL 3D chart with the following code:

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Bitmap bmp = tChart1.Bitmap;
            for (double x = 10.765; x < 51.534; x +=10)
                for (double z = 10.765; z <51.534; z +=10)
                    surface1.Add(x, x + z, z);
        }
    }
}
While running the appication I've got this exeption

Image
If I use x++ and z++ instead of x+=10 and z+=10 the code works fine.
Is this a feature or a bug?Maybe I should use some tricks?

Thank you.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 30, 2006 3:37 pm

Hi bairog,

Have you tried setting the surface to IrregularGrid?

Code: Select all

            surface1.IrregularGrid = true;
You need to do this when x an z values are not equidistant and their increment is greater than 1.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

bairog
Newbie
Newbie
Posts: 72
Joined: Fri Jul 07, 2006 12:00 am
Location: Moscow, Russia
Contact:

Post by bairog » Tue Dec 05, 2006 1:14 pm

I followed your advice. Thank you.

Post Reply