Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TChart Contour Map not working

Status
Not open for further replies.

MARTINRODDY

Programmer
Joined
Apr 3, 2001
Messages
30
Location
US
HI,

I am trying to plot a contour map for a circlcular surface. I have the contour map working great for the square surface but for the round surface the contour map does not look correct. The contour lines are not joining.

I am using the TChart component in Delphi 5. Here is the code (below) that I am using to feed the values into the component.

It is really difficult to explain this with out having a graphical example. This problem is the last bit holding this project up. Thanks for any help that you may have.

Martin.

roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,38]),-3);
roundcon.AddXYZ(0.77,strtofloat(grdPoints.cells[1,39]),-2.89);
roundcon.AddXYZ(-0.77,strtofloat(grdPoints.cells[1,37]),-2.89);
roundcon.AddXYZ(-1.5,strtofloat(grdPoints.cells[1,36]),-2.5);
roundcon.AddXYZ(-1.5,strtofloat(grdPoints.cells[1,40]),-2.5);

roundcon.AddXYZ(2.1,strtofloat(grdPoints.cells[1,41]),-2.1);
roundcon.AddXYZ(-2.1,strtofloat(grdPoints.cells[1,35]),-2.1);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,18]),-2);
roundcon.AddXYZ(0.76,strtofloat(grdPoints.cells[1,19]),-1.84);
roundcon.AddXYZ(-0.76,strtofloat(grdPoints.cells[1,17]),-1.84);

roundcon.AddXYZ(2.5,strtofloat(grdPoints.cells[1,42]),-1.5);
roundcon.AddXYZ(-2.5,strtofloat(grdPoints.cells[1,34]),-1.5);
roundcon.AddXYZ(1.41,strtofloat(grdPoints.cells[1,20]),-1.41);
roundcon.AddXYZ(-1.41,strtofloat(grdPoints.cells[1,16]),-1.41);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,6]),-1);

roundcon.AddXYZ(2.89,strtofloat(grdPoints.cells[1,43]),-0.77);
roundcon.AddXYZ(-2.89,strtofloat(grdPoints.cells[1,33]),-0.77);
roundcon.AddXYZ(-1.84,strtofloat(grdPoints.cells[1,15]),-0.76);
roundcon.AddXYZ(1.84,strtofloat(grdPoints.cells[1,21]),-0.76);
roundcon.AddXYZ(0.7,strtofloat(grdPoints.cells[1,7]),-0.7);

roundcon.AddXYZ(-0.7,strtofloat(grdPoints.cells[1,5]),-0.7);
roundcon.AddXYZ(-3,strtofloat(grdPoints.cells[1,32]),0);
roundcon.AddXYZ(-2,strtofloat(grdPoints.cells[1,14]),0);
roundcon.AddXYZ(-1,strtofloat(grdPoints.cells[1,4]),0);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,1]),0);

roundcon.AddXYZ(1,strtofloat(grdPoints.cells[1,8]),0);
roundcon.AddXYZ(2,strtofloat(grdPoints.cells[1,22]),0);
roundcon.AddXYZ(3,strtofloat(grdPoints.cells[1,44]),0);
roundcon.AddXYZ(0.7,strtofloat(grdPoints.cells[1,9]),0.7);
roundcon.AddXYZ(-0.7,strtofloat(grdPoints.cells[1,3]),0.7);

roundcon.AddXYZ(-1.84,strtofloat(grdPoints.cells[1,13]),0.76);
roundcon.AddXYZ(1.84,strtofloat(grdPoints.cells[1,23]),0.76);
roundcon.AddXYZ(2.89,strtofloat(grdPoints.cells[1,45]),0.77);
roundcon.AddXYZ(-2.89,strtofloat(grdPoints.cells[1,31]),0.77);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,2]),1);

roundcon.AddXYZ(1.41,strtofloat(grdPoints.cells[1,24]),1.41);
roundcon.AddXYZ(-1.41,strtofloat(grdPoints.cells[1,12]),1.41);
roundcon.AddXYZ(-2.5,strtofloat(grdPoints.cells[1,30]),1.5);
roundcon.AddXYZ(2.5,strtofloat(grdPoints.cells[1,46]),1.5);
roundcon.AddXYZ(0.76,strtofloat(grdPoints.cells[1,25]),1.84);

roundcon.AddXYZ(-0.76,strtofloat(grdPoints.cells[1,11]),1.84);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,10]),2);
roundcon.AddXYZ(2.1,strtofloat(grdPoints.cells[1,47]),2.1);
roundcon.AddXYZ(-2.1,strtofloat(grdPoints.cells[1,29]),2.1);
roundcon.AddXYZ(-1.5,strtofloat(grdPoints.cells[1,28]),2.5);

roundcon.AddXYZ(1.5,strtofloat(grdPoints.cells[1,48]),2.5);
roundcon.AddXYZ(0.77,strtofloat(grdPoints.cells[1,49]),2.89);
roundcon.AddXYZ(-0.77,strtofloat(grdPoints.cells[1,27]),2.89);
roundcon.AddXYZ(0,strtofloat(grdPoints.cells[1,26]),3);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top