Page 1 of 1

Drawing lines on a Point3D series

Posted: Tue Jan 15, 2008 1:02 am
by 9340420
I am drawing lines between selected points of a 2D using standard Canvas operations (MoveTo, LineTo), CalcXPosValue and CalcYPosValue. I am doing this using the BeforeDrawSeries event. The result is exactly what I expect and look like this:

http://www.simstat.com/Network.png

Now I would like to do something else with a 3D version of this, but I don't find any method to transform an X-Y-Z coordinates into a X and Y coordinates for the canvas. Is there such a method?

If not, what would be the atlternate ways to achieve this.

Those lines should ideally be of different pen width (to reflect the strength of the relationship) and there may be several lines going from one point to several others.

Any suggestion!

Normand

P.S. I did think about creating another Point3DSeries for drawing lines only (no data point), but it could require a huge amount of data point when representing all links between 200 or 500 items.

Posted: Tue Jan 15, 2008 9:43 am
by narcis
Hi Normand,

What about using MoveTo3D and LineTo3D methods with X,Y and Z coordinates? Something like this:

Code: Select all

  Chart1.Canvas.Pen.Width:=3;
  Chart1.Canvas.MoveTo3D(X0,Y0,Z0);
  Chart1.Canvas.LineTo3D(X1,Y1,Z1);

CalcZPosValue

Posted: Tue Jan 22, 2008 12:47 pm
by 9340420
Excellent, but it seems that there is no CalcZPosValue. How can I replicate this function.
narcis wrote:Hi Normand,

What about using MoveTo3D and LineTo3D methods with X,Y and Z coordinates? Something like this:

Code: Select all

  Chart1.Canvas.Pen.Width:=3;
  Chart1.Canvas.MoveTo3D(X0,Y0,Z0);
  Chart1.Canvas.LineTo3D(X1,Y1,Z1);

Posted: Tue Jan 22, 2008 3:00 pm
by narcis
Hi Normand,

What about obtaining the value from CalcZPos? This requires a series ValueIndex. You could find it using Series1.ZValues.Locate which already uses a double value and returns a ValueIndex.

Hope this helps!

Posted: Tue Jan 22, 2008 3:41 pm
by 9340420
Thanks Narcis, it works great!

Normand
narcis wrote:Hi Normand,

What about obtaining the value from CalcZPos? This requires a series ValueIndex. You could find it using Series1.ZValues.Locate which already uses a double value and returns a ValueIndex.

Hope this helps!