Animating a Surface Plot

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Sharpenski
Newbie
Newbie
Posts: 36
Joined: Wed Aug 24, 2016 12:00 am

Animating a Surface Plot

Post by Sharpenski » Thu Nov 17, 2016 4:11 pm

I would like to animate the Surface Plot so that it tilts in various directions and orientation for a period of time. I have found a rotation tool in the animation presets but it only rotates on the horizontal plane. How do I acheive the former effect (or, at least, is it possible)?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Animating a Surface Plot

Post by Yeray » Fri Nov 18, 2016 9:44 am

Hello,

You could put a TTimer and change the Chart.Aspect.Rotation and Chart.Aspect.Elevation as you wish. Ie:

Code: Select all

uses TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TSurfaceSeries).FillSampleValues();

  Chart1.Aspect.Orthogonal:=false;
  Chart1.Chart3DPercent:=100;
  Chart1.Legend.Visible:=false;
  Chart1.Aspect.Zoom:=80;

  Chart1.Walls.Visible:=false;
  Chart1.Axes.Visible:=false;

  Timer1.Interval:=100;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Chart1.Aspect.Elevation:=Chart1.Aspect.Elevation+10 mod 360;
  Chart1.Aspect.Rotation:=Chart1.Aspect.Rotation+10 mod 360;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply