3D: symbols, elevation, inertia, and "roll"

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
KevinKillion
Newbie
Newbie
Posts: 11
Joined: Wed Jul 07, 2010 12:00 am

3D: symbols, elevation, inertia, and "roll"

Post by KevinKillion » Thu Feb 03, 2011 7:18 pm

To Narcis, thanks for the tip about using the 3D series ... they look great!!

But there are some remaining puzzles:

* The symbols in the 3D series are flat when viewed at an oblique angle. The Point3D series shows flat rectangles, where one might expect cubes. Similarly, the Bubble3D series shows flat circles, not spheres. Worst of all, when viewed from the side, these symbols are just short lines. Fix?

* I added the RotateTool and it works great. BUT ... Elevation seems to be constrained to a 90 degree angle, between a "front" view and an "overhead" view. Is there a way to tell the RotateTool to allow Elevation to change continuously, the same way that Rotation works?

* Inertia: I love that I can set Inertia to 100 to keep a plot spinning continuously after I release the mouse button. But how does the user STOP the rotation? I would expect that a simple click (without a drag) would stop it in place irregardless of the Inertia setting, which is what a "spin" plot does in stat programs. Instead, a simple click imparts a very slow spin.

* Big omission? It seems that in a 3D chart we can control "pitch" (Elevation) and "yaw" (Rotation) but not "roll". By itself, this would only be a annoyance, since in a "spin" chart one could get a display however you'd like by applying the other two axes of rotation IF those axes of rotation applied to the "cloud" as displayed, rather than to the original coordinates, BUT ...

* ... they don't. Example: With the RotateTool in place, drag DOWN on the plot until we are looking "overhead". Now if you drag left or right, the action is to rotate the plot with respect to the original coords, not to what we are looking at now. The user perception is counterintuitive: a left or right motion does not "pull" the points to "follow" the movement, but rather the plot appears to rotate in 2D.


Let me explain why those last two are important. (SEE THE ATTACHMENT.) I built this chart using a Bubble3D series with some sample data. With the RotateTool hand, I manipulated the chart until I discovered that all of the points lie near a plane that cuts through the 3D display at oblique angles. This is exactly the kind of discovery that scientists, statisticians and others use spin plots for! The mostly likely next step a user would want would be to see the points looking down perpendicularly on that plane. If I had a way to do a "roll" on the points AS SHOWN it would be an easy matter to "tip" them until they line up horizontally and then "pitch" until I'm not looking down on the flat plane (which is oblique to the original axes).

THANKS FOR YOUR HELP. The more I use TChart, the more impressed I am with it!

Kevin
Attachments
Capture3d.JPG
Capture3d.JPG (96.94 KiB) Viewed 3332 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: 3D: symbols, elevation, inertia, and "roll"

Post by Sandra » Tue Feb 08, 2011 5:06 pm

Hello kevinKillion,
* The symbols in the 3D series are flat when viewed at an oblique angle. The Point3D series shows flat rectangles, where one might expect cubes. Similarly, the Bubble3D series shows flat circles, not spheres. Worst of all, when viewed from the side, these symbols are just short lines. Fix?
If you want achieve the 3D series full and not flat, you can use a OpenGl Canvas as do in next example of code:

Code: Select all

unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, TeeSurfa, TeePoin3,
  TeeComma, TeeOpenGL;
type
  TForm1 = class(TForm)
    Chart1: TChart;
    TeeCommander1: TTeeCommander;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

var Series1: TPoint3DSeries;
Series2:TBubble3DSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
  with TTeeOpenGL.Create(self) do
  begin
     TeePanel:=Chart1;
     Active:=true;
  end;
  Series1 := TPoint3DSeries.Create(self);
  Series2 := TBubble3DSeries.Create(self);
  Chart1.AddSeries(Series1);
  Series1.FillSampleValues(10);
  Series1.LinePen.Visible:= False;
  Series1.Pointer.Style:= psCircle;
  Series1.Pointer.HorizSize:=20;
  Series1.Pointer.VertSize:=20;
end;
end.
* I added the RotateTool and it works great. BUT ... Elevation seems to be constrained to a 90 degree angle, between a "front" view and an "overhead" view. Is there a way to tell the RotateTool to allow Elevation to change continuously, the same way that Rotation works?
If you want you can change in the code your elevation changing degrees from 0 to 360. You need next:

Code: Select all

  Chart1.Aspect.Elevation:= 270;
* Inertia: I love that I can set Inertia to 100 to keep a plot spinning continuously after I release the mouse button. But how does the user STOP the rotation? I would expect that a simple click (without a drag) would stop it in place irregardless of the Inertia setting, which is what a "spin" plot does in stat programs. Instead, a simple click imparts a very slow spin.
You can use Chart events OnClick and OnDblClick as do in next lines of code:

Code: Select all

procedure TForm1.Chart1DblClick(Sender: TObject);
begin
    ChartTool1.Inertia:=0;
end;

procedure TForm1.Chart1Click(Sender: TObject);
begin
ChartTool1.Inertia:=100;
end;
Also, you can use the property of Pointer Depth of some style of pointer as rectangle and triangle. To do it in code you can do next:

Code: Select all

  Series1.Pointer.Style:= psRectangle;
  Series1.Pointer.Depth:=8;
* Big omission? It seems that in a 3D chart we can control "pitch" (Elevation) and "yaw" (Rotation) but not "roll". By itself, this would only be a annoyance, since in a "spin" chart one could get a display however you'd like by applying the other two axes of rotation IF those axes of rotation applied to the "cloud" as displayed, rather than to the original coordinates, BUT ...

* ... they don't. Example: With the RotateTool in place, drag DOWN on the plot until we are looking "overhead". Now if you drag left or right, the action is to rotate the plot with respect to the original coords, not to what we are looking at now. The user perception is counterintuitive: a left or right motion does not "pull" the points to "follow" the movement, but rather the plot appears to rotate in 2D.


Let me explain why those last two are important. (SEE THE ATTACHMENT.) I built this chart using a Bubble3D series with some sample data. With the RotateTool hand, I manipulated the chart until I discovered that all of the points lie near a plane that cuts through the 3D display at oblique angles. This is exactly the kind of discovery that scientists, statisticians and others use spin plots for! The mostly likely next step a user would want would be to see the points looking down perpendicularly on that plane. If I had a way to do a "roll" on the points AS SHOWN it would be an easy matter to "tip" them until they line up horizontally and then "pitch" until I'm not looking down on the flat plane (which is oblique to the original axes).
Can you please explain exactly how we do for reproduce it? So we can try to help you to solve it.

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

Post Reply