Hello,
I want to draw a round surface with a hole inside.
The result is not what I expect. There are side effects at the contour.
Is there a way to remove these drawings not very nice and which are not par tof the real surface ?
I joined an example code.
It runs under Delphi XE2 VCL and teechart 2013
Thanks in advance.
Nicolas
Tsurface contour effect
Tsurface contour effect
- Attachments
-
- TeeChartTest.7z
- (61.53 KiB) Downloaded 331 times
Re: Tsurface contour effect
Hello Nicolas,
I'm not sure if this is what you where looking for but if I comment the last AddXYZ call in your code, I get this:
If this is not what you where trying to draw, please try to highlight what exact polygons you find to be not expected given the data you've entered.
Thanks in advance.
I'm not sure if this is what you where looking for but if I comment the last AddXYZ call in your code, I get this:
Code: Select all
n := 10;
Series1.Clear;
for i := -n to n do
begin
for j := -n to n do
begin
r := sqrt(sqr(i)+sqr(j));
if (r<=n) then
begin
if (r>4) then
begin
Series1.AddXYZ(i, Cos(2*pi*r/n), j);
end else
Series1.AddXYZ(i, 0, j, '', clNone);
end else
// Series1.AddXYZ(i, 0, j, '', clNone);
end;
end;
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Tsurface contour effect
Hello,
Thank you for your answer, it's what I want to get. I want too that the contour of the hole inside has not this effect. I tried your correction, but I've got a violation access (I just comment the last AddXYZ line).
Maybe I have a wrong installation because if I don't fill all the points of the series (it means 10x10 points), I have this access violation.
First I've just wanted to add points where the data are valid. I think it should be possible to fill the series with any number of points. So I don't understand this behavior.
My goal is to draw a surface in which there are holes with any number of points.
Nicolas
Thank you for your answer, it's what I want to get. I want too that the contour of the hole inside has not this effect. I tried your correction, but I've got a violation access (I just comment the last AddXYZ line).
Maybe I have a wrong installation because if I don't fill all the points of the series (it means 10x10 points), I have this access violation.
First I've just wanted to add points where the data are valid. I think it should be possible to fill the series with any number of points. So I don't understand this behavior.
My goal is to draw a surface in which there are holes with any number of points.
Nicolas
Re: Tsurface contour effect
Hi Nicolas,
If I remove another line I get this: Here is the code I have:
And here the complete project:
Maybe you are not using the latest TeeChart version, are you?
What IDE are you using?
You could also try setting IrregularGrid to true. See this for more info on how to populate this kind of series.
If I remove another line I get this: Here is the code I have:
Code: Select all
procedure TForm2.BDisplayClick(Sender: TObject);
var i, j : integer;
n : integer;
r : double;
begin
n := 10;
Series1.Clear;
for i := -n to n do
begin
for j := -n to n do
begin
r := sqrt(sqr(i)+sqr(j));
if (r<=n) then
begin
if (r>4) then
begin
Series1.AddXYZ(i, Cos(2*pi*r/n), j);
end; {else
Series1.AddXYZ(i, 0, j, '', clNone);}
end; {else
Series1.AddXYZ(i, 0, j, '', clNone);}
end;
end;
end;
What IDE are you using?
You could also try setting IrregularGrid to true. See this for more info on how to populate this kind of series.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Tsurface contour effect
Hello,
I was using Delphi XE2 with Teechart VCL 2013.
I installed the new version 2014 of Teechart for XE2 and it solved my issue of violation access.
Now I will try to customize my drawing by removing the line and by smoothing the colors between cells.
Thank you for your answers.
Best regards
Nicolas
I was using Delphi XE2 with Teechart VCL 2013.
I installed the new version 2014 of Teechart for XE2 and it solved my issue of violation access.
Now I will try to customize my drawing by removing the line and by smoothing the colors between cells.
Thank you for your answers.
Best regards
Nicolas