Drawing Lines in 3D Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Drawing Lines in 3D Chart

Post by HMI » Thu May 31, 2007 12:06 pm

Hi again^^

Hopefully you can help me once more.
Now I have to draw lines in my 3D Chart.
Everything about Lines I found yet, is about drawing
them in 2D (Nothing like AddXYZ(x1,y1,z1,x2,y2,z3))

Background:
I have a set of values. All of them are related to some
special area where they where measured. No I
visualize these values with a SurfaceSeries. What I have to
do now is to visualize the borders between the special areas,
best would be on the SurfaceSerie itself.

Any suggestions?

thanks in advance,
HMI

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 May 31, 2007 1:17 pm

Hi HMI,

The best option here may be using TPoint3DSeries which already has AddXYZ method. If you don't want to see the pointers you can do this:

Code: Select all

  Series2.Pointer.Visible:=false;
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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Mon Jun 04, 2007 8:32 am

You mean, adding the Points in the right way and display there connection lines?
Mhh, sounds possible, but maybe a bit difficult. I will look
how this works.

I will report back.

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

Post by Narcís » Mon Jun 04, 2007 8:36 am

Hi HMI,

Yes, that's what I mean, plotting 3D points with X,Y and Z coordinates but making the points not visible, just its connecting line.
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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Mon Jun 04, 2007 1:54 pm

Ok, back again from testing.
Although this idea is not bad, it fits not my requirements.

I try to explain it:
In this picture you can see an example graph
of my problem:
Image

the problem is, that at the rising curve I only have the values from the
bottom and the top.
But the area change is between these two values.
If I interpolate the possible y values for the line, then it can
happen that the line is over or under the surface, depending on
the interpolation algorithm.


But by viewing this sample picture, I got another idea:
There are already lines at the surface(ContourPlot), one of these could fit my desired line. Is it possible to show only a specific contour line?
unfortunately I don't think so...

Kind regards,
HMI

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

Post by Narcís » Mon Jun 04, 2007 2:41 pm

Hi HMI,

Sorry but I don't understand what is your exact problem and what you are trying to achieve. Could you please give me more detailed information?

Thanks in advance.
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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Mon Jun 04, 2007 2:54 pm

Hi Narcis,

I thought it would not be easy to understand me^^
I try it again.
The image on which I try to explain:
Image

I have a set of Gridpoints(regular positions, not that diffuse like in the picture), x and z for the position, y the value.
Theses Gridpoints belong to a "cell" (4 cell's in the sample).

What I want to do is visualize the cell borders.
But I only have the y values of the gridpoints.

If I want to draw a line representating the borders, I need
there "y values" to draw them "on" the surface.
To get those y values I can only interpolate between the gridpoints
around the cellborder. But by doing this it can happen that the y values
are not at the same level as the surfaceSerie in this point.
that would mean the line is under or above the Surfaceserie.
But I want it on top, like the ContourSeries lines.

Saying this, I thought it could be possible, if the contourSeries
shows only 1 specific y level line.
Is this possible?

Hope now it gets a bit clearer...

Kind regards,
Hmi

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

Post by Narcís » Tue Jun 05, 2007 11:20 am

Hi HMI,

Thanks for the information.

We think we understood what you are looking for. We suggest you to use 3 Points3D series like this:

Image

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
x, z, numValues : Integer;
begin
  numValues:=30;

  for x:=0 to numValues do
    for z:=0 to numValues do
      Begin
        Series1.AddXYZ(x,Sin(z/numValues*2)-Cos(x/numValues*2),z);
        if (x=15) then
          Series2.AddXYZ(x,Series1.YValues.Last,z);
        if (z=15) then
          Series3.AddXYZ(x,Series1.YValues.Last,z);
      end;
end;
Instead of having Series2 and Series3 following Series1 data you could also set them to IrregularGrid=true and use double x and z values to plot an interpolated grid that fits your needs.

Also notice that Series1 is a Points3D series with no lines visible while Series2 and Series3 are Points3D series as well but only displaying its lines and no pointers.
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

HMI
Newbie
Newbie
Posts: 32
Joined: Fri May 11, 2007 12:00 am

Post by HMI » Wed Jun 06, 2007 7:18 am

That seems a good solution. I will see in how far I could
implement it in my code.

Thanks again, and have a nice day,
HMI

Post Reply