Page 1 of 1
How to draw an elliptic cylinder?
Posted: Fri Sep 11, 2020 5:09 am
by 16586272
The axis of an elliptic cylinder is a 3D curve, and its cross section at any position is an ellipse. The 3D curve and a series of cross-section ellipses are known. That is to say, we know the 3D coordinates of the curve and ellipses at any position. I have no idea to draw the elliptic cylinder. Would you like to give me an example? Thanks a lot.
Re: How to draw an elliptic cylinder?
Posted: Tue Sep 15, 2020 12:51 pm
by yeray
Hello,
I'm afraid there's no series or tool implemented in TeeChart doing this for you, but once you have the data, it should be possible to use a TSurfaceSeries or a
TPoint3DSeries to draw it.
Re: How to draw an elliptic cylinder?
Posted: Fri Sep 18, 2020 2:19 am
by 16586272
it should be possible to use a TSurfaceSeries or a TPoint3DSeries to draw it.
It is great and useful.
If it is required to draw a semitransparent surface, how to set Brush’s transparency? Or, is there any other way?
Re: How to draw an elliptic cylinder?
Posted: Fri Sep 18, 2020 7:58 am
by yeray
Hello,
Transparency is applied with Blending:
Code: Select all
uses TeCanvas;
//...
var tmpBlend : TTeeBlend;
const transp=80;
begin
//Prepare Pen and Brush
if transp>0 then
tmpBlend:=Chart1.Canvas.BeginBlending(TeeZeroRect,transp);
//Draw polygon
if transp>0 then
Chart1.Canvas.EndBlending(tmpBlend);
Re: How to draw an elliptic cylinder?
Posted: Mon Sep 21, 2020 2:14 am
by 16586272
It works fine.
How to make such a Series visible or not as required? i.e. use a CheckBox to make it visible or not.
Re: How to draw an elliptic cylinder?
Posted: Fri Sep 25, 2020 1:54 pm
by yeray
That depends on how are you drawing the polygons. If you are drawing them at a series' OnGetPointerStyle event as in the example I linked above, disabling the series should be enough to stop calling that event and thus your custom drawing code.