1. Is it effective to use some Point3DSeries, ShapeSeries and SurfaceSeries on one Chart concurrently? In addition, is the Point3DSeries generally used to draw 3D curves?
2. It seems that the TopAxis does not appear on the Point3DSeries Chart. If the three TChartAxes are required as shown in Fig3D, How to implement? Would you like to give me an example?
3. The titles of some TChartAxes are always horizontal or vertical, is it possible to slant them to the direction of the ChartAxes?
4. I have located a reference to a MakeIso3DAxis procedure in the forums, but it made in VB6. Do you have a link to the code in Delphi?
Draw 3D curves and shapes
Draw 3D curves and shapes
- Attachments
-
- Fig3D.jpg (68.91 KiB) Viewed 10915 times
Re: Draw 3D curves and shapes
Hello,
Also note the Shape Series is a 2D series and it's drawn in a Z position internally calculated based on it's position in the SeriesList.
Using OpenGL gives a better result in 3D charts with crossing lanes or planes.liuxs wrote:1. Is it effective to use some Point3DSeries, ShapeSeries and SurfaceSeries on one Chart concurrently? In addition, is the Point3DSeries generally used to draw 3D curves?
Also note the Shape Series is a 2D series and it's drawn in a Z position internally calculated based on it's position in the SeriesList.
Here it is:liuxs wrote:2. It seems that the TopAxis does not appear on the Point3DSeries Chart. If the three TChartAxes are required as shown in Fig3D, How to implement? Would you like to give me an example?
Code: Select all
uses TeeShape, TeePoin3, TeeSurfa, TeeGLCanvas;
var ShapeSeries: TChartShape;
SurfaceSeries: TSurfaceSeries;
PointSeries: TPoint3DSeries;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.Canvas:=TGLCanvas.Create;
Chart1.Aspect.Orthogonal:=False;
Chart1.Aspect.Zoom:=65;
Chart1.Chart3DPercent:=100;
Chart1.Legend.Visible:=False;
ShapeSeries:=Chart1.AddSeries(TChartShape) as TChartShape;
SurfaceSeries:=Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries;
PointSeries:=Chart1.AddSeries(TPoint3DSeries) as TPoint3DSeries;
SurfaceSeries.FillSampleValues;
for i:=0 to SurfaceSeries.Count-1 do
PointSeries.AddXYZ(SurfaceSeries.XValue[i], SurfaceSeries.YValue[i], SurfaceSeries.ZValue[i]);
with ShapeSeries do
begin
X0:=SurfaceSeries.XValues.MinValue;
Y0:=SurfaceSeries.YValues.MinValue;
X1:=SurfaceSeries.XValues.MaxValue;
Y1:=SurfaceSeries.YValues.MaxValue;
end;
ShapeSeries.HorizAxis:=aTopAxis;
SurfaceSeries.HorizAxis:=aTopAxis;
PointSeries.HorizAxis:=aTopAxis;
Chart1.Axes.Left.ZPosition:=100;
Chart1.Axes.DepthTop.Visible:=True;
Chart1.Walls.Visible:=False;
end;
You could try to calculate the angle at the Chart's OnBeforeDrawAxes event and set the Axis Title.Angle property.liuxs wrote:3. The titles of some TChartAxes are always horizontal or vertical, is it possible to slant them to the direction of the ChartAxes?
There's an example without code here. I'll try to find and attach the code here if possible.liuxs wrote:4. I have located a reference to a MakeIso3DAxis procedure in the forums, but it made in VB6. Do you have a link to the code in Delphi?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Draw 3D curves and shapes
I cannot download the file from the link you provided. Can you attach it here or email it to me? Thanks!There's an example without code here. I'll try to find and attach the code here if possible.
Re: Draw 3D curves and shapes
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |