begin
VIEW.Invalidate;
PlaneXY.MeshObjects.clear ;
ResultsMesh:= TMeshObject.CreateOwned (PlaneXY.MeshObjects) ;
ResultsMesh.Mode:=momFaceGroups ;
with ResultsMesh do
begin
K:= 1 + trunc (NumPTZTRKMoveResultsPlane.Position /(TRKMoveResultsPlane.Max));
for I:= 1 to NumPTX+1 do
begin
for J:= 1 to NumPTY+1 do
begin
Vertices.Add( XC[I,J,K] , YC[I,J,K] , ZC[I,J,K] );
TexCoords.Add(res3DPlane[I,J,K],0) ;
MMT_like:= (I-1)NumPTY + J + I -2 ;
end;
end;
Dear Pavel
Thank you very much. I downloaded the documentation and will work on it. In the past I was used to draw the isolines using packages like mathimage
When iI see the textures like I posted in the figure I see that GLscene do the work except putting some scale lines between the colours. I will check the codes and comment after
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sergio,
Now TGLTerrainRenderer and TGLROAMPatch have ContourInterval and ContourWidth properties, that used by procedure DrawContours(). Yet without splines and text signatures. See updated ShadedTerrain demo in mesh folder.
PW
Dear Paul
Only now I saw your post. Thanks a lot
I am trying to re-start to use XE7 to check how the updated Shaded Terrain works.
Nevertheless I am having a problem in installing GLscene in XE7 (see another post below)
I have Delphi XE7 and I am using Windows 8 in a 64 bits computer
I am trying to install GLscene using the instructions in file:///C:/GLscene/_Installation/Installation.htm
One year ago I succeeded but returned to use Delphi2010. Now I am starting again to use XE7
I downloaded GLscene version SVN update 6665 and tried to be carefull in seeting the library path
After many trials I always get the error message [dcc32 Fatal Error] E2202 Required package 'DesignID' not found
I checked some posts about the same error but did not suceed .
I did a search to find where DesignIDE.dcp file is and I found it in C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\debug . I included also this in the library path but I get always the same merror message
Can you help me indicating where the error is ?
Actually I am trying to use the new updated ShadedTerrain demo in mesh folder (thanks PW).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could now install using the basic installation instructions
The problem was that it was missing in the library path the link to
C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\release.
(Instead of what I was doing C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\debug).
Now I will try the isolines in Terrain
P.S: maybe the information “insert in the library path the path to vcl.dcp “ could be added in the installation instructions. By some reason my computer did not find it automatically
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Paul The TGLTerrainRenderer and TGLROAMPatch with ContourInterval and ContourWidth properties, used by DrawContours() is very useful. Text signatures would make then even better. In general when using this we need to see the scale in the scene or in the MathImg (modified) attached I do not know if it is achievable but would be great to have these contours in componnts like TGLfreeform. Forthe moment I am trying to put the TerrainRenderer in the place of the TGLfreeform showed in my yesterday temperature mapping post
Sergio,
I've rectified slightly your mathdemoisolines for xe8 and looked at the code, but it seems it not suits to TGLRoamPatch unit. It could be build into GLIsolines unit to expand Conrec method for TGLhightField or TGLXYZGrid objects. See ConrecTest demo which creates isolines in Data\Isolines.dat. And yes, text signatures and ticks would make it much better, but the work is not easy.
PW
Code attached - A help to improve it is very welcome.
Using my limited knowledge of GLscene I could implement the level lines in the TGLfreeform. The code is attached. It is running but needs a cleaning up to remove errors like:
a) The undue lines connecting different isolines
b) The stack overflow when closing the screen
c) When I change from one example to another how to clean completely the previous one from the screen
d) Seems not to be difficult to write the values in the isolines but I still do not know how to do it.
Thanks to the work of Nicholas Yue CONREC.C , Paul D. Bourke CONREC.F and Alexander Weidauer. Here I tried to use the results of Conrec to draw isolines in a XY plane formed by a GLscene TGLfreeform.
Code attached
Now some errors were solved but some remains.
Please help me with the following doubts
a) When I change from one example to another how to clean completely the previous one from the screen?
b) There is a stack overflow when closing the screen
c) Why doubled symectrical isolines are created ? The input data data is not symectrical
d) Seems not to be difficult to write the values in the isolines but I still do not know how to do it.
Hi Eric
Nice to hear from you. I am interested to receive your information here or in my email sergiofeitoza@cognitor.com.br .
I am trying to finish the code of this post with the isolines in the email but some doubts still remains like below. The main doubts are not in the mathematics but instead in easy (not for me) things.
In the example 3 I included your equation. Check what happened:
Maybe someone can help me with these doubts:
a) When I change from one example to another how to clean completely the previous one from the screen?
b) Why I have the error “stack overflow” when closing the screen clicking in the Close button
Thank you in advance . Code below and complete source code attached
Sergio
P.S: Any help in the post "temperatures mapping" is also welcome
I am still fighting with the isolines. I replaced the GL lines by GLpoints so I can now see the lines (code and figure attached)
What I do not understand is why I am getting the stack overflow error when I close the program
In the CONREC algorithm procedure I am trying to identify which is the variable which gives the value of each level isoline.I need this to write the value in the scene
Any help is welcome
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Paul I read the GLisolines unit . I think I have to call MakeIsolines but not sure
Do you some lines of code calling the procedure or even a short demo ?
Thank you in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could use the CONREC inside GLisolines. A certain small work to get the values inside text file F manipiulating strings but OK
The results are equal to before
The isolines.pas procedure in GLscene is very useful. It seems that a detail is missing to enable a complete use with GLisolines
With the current procedure we can generate all the points of the isolines (not ordered) and this is what is returned in the var F (file text) .Doing this and using GLponts to obtain the result attached which is an incomplete solution (see attachment)
To do the right thing I need to use TGLlines for each isoline I did first a small “txt” routine to separate the values which will compose each isoline.
Then for each isoline I have now a sub-F file .
To enable to use a TGLline to draw the isoline I need to sort this file by “neighbor points”.
So, what I need is a fast routine that takes the sub-F file and sort these points neighbor by neighbor. Do you have this ?
I tried to look inside isolines.pas and I saw there are many things there but could not identify this
I am mapping a field in a plane using the code below
Please check the result I get in http://www.cognitor.com.br/contourlines.png
Is there any resource / setting to transform this in the classical "contour lines" (isolines separating some colours from the others ?
Is it possible to write more intermediate values in the left side colour scale ?
procedure TForm3.CreatePlane;
var auxi:real; ResultsMesh : TMeshObject ;
Quads :TFGVertexIndexList ; I,J,K,MMT_like:integer;
begin
VIEW.Invalidate;
PlaneXY.MeshObjects.clear ;
ResultsMesh:= TMeshObject.CreateOwned (PlaneXY.MeshObjects) ;
ResultsMesh.Mode:=momFaceGroups ;
with ResultsMesh do
begin
K:= 1 + trunc (NumPTZTRKMoveResultsPlane.Position /(TRKMoveResultsPlane.Max));
for I:= 1 to NumPTX+1 do
begin
for J:= 1 to NumPTY+1 do
begin
Vertices.Add( XC[I,J,K] , YC[I,J,K] , ZC[I,J,K] );
TexCoords.Add(res3DPlane[I,J,K],0) ;
MMT_like:= (I-1)NumPTY + J + I -2 ;
end;
end;
PlaneXY.StructureChanged ;
Sergio,
How to use a TMesh for contouring see e.g. http://cc.embarcadero.com/item/29365
PW
Dear Pavel
Thank you very much. I downloaded the documentation and will work on it. In the past I was used to draw the isolines using packages like mathimage
When iI see the textures like I posted in the figure I see that GLscene do the work except putting some scale lines between the colours. I will check the codes and comment after
Sergio,
Now TGLTerrainRenderer and TGLROAMPatch have ContourInterval and ContourWidth properties, that used by procedure DrawContours(). Yet without splines and text signatures. See updated ShadedTerrain demo in mesh folder.
PW
Dear Paul
Only now I saw your post. Thanks a lot
I am trying to re-start to use XE7 to check how the updated Shaded Terrain works.
Nevertheless I am having a problem in installing GLscene in XE7 (see another post below)
I have Delphi XE7 and I am using Windows 8 in a 64 bits computer
I am trying to install GLscene using the instructions in file:///C:/GLscene/_Installation/Installation.htm
One year ago I succeeded but returned to use Delphi2010. Now I am starting again to use XE7
I downloaded GLscene version SVN update 6665 and tried to be carefull in seeting the library path
After many trials I always get the error message
[dcc32 Fatal Error] E2202 Required package 'DesignID' not found
I checked some posts about the same error but did not suceed .
I did a search to find where DesignIDE.dcp file is and I found it in C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\debug . I included also this in the library path but I get always the same merror message
Can you help me indicating where the error is ?
Actually I am trying to use the new updated ShadedTerrain demo in mesh folder (thanks PW).
SOLVED
I could now install using the basic installation instructions
The problem was that it was missing in the library path the link to
C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\release.
(Instead of what I was doing C:\Program Files (x86)\Embarcadero\Studio\15.0\lib\win32\debug).
Now I will try the isolines in Terrain
P.S: maybe the information “insert in the library path the path to vcl.dcp “ could be added in the installation instructions. By some reason my computer did not find it automatically
Paul The TGLTerrainRenderer and TGLROAMPatch with ContourInterval and ContourWidth properties, used by DrawContours() is very useful. Text signatures would make then even better. In general when using this we need to see the scale in the scene or in the MathImg (modified) attached I do not know if it is achievable but would be great to have these contours in componnts like TGLfreeform. Forthe moment I am trying to put the TerrainRenderer in the place of the TGLfreeform showed in my yesterday temperature mapping post
Sergio,
I've rectified slightly your mathdemoisolines for xe8 and looked at the code, but it seems it not suits to TGLRoamPatch unit. It could be build into GLIsolines unit to expand Conrec method for TGLhightField or TGLXYZGrid objects. See ConrecTest demo which creates isolines in Data\Isolines.dat. And yes, text signatures and ticks would make it much better, but the work is not easy.
PW
Last edit: Pavel Vassiliev 2015-05-28
Thank you Paul for the good material. I am studying how to insert some visualization of results in the ConrecTest code and also in my code
I think it will work. For other coleagues, there are some explanations http://paulbourke.net/papers/conrec/
When I succeed I will post here.
Code attached - A help to improve it is very welcome.
Using my limited knowledge of GLscene I could implement the level lines in the TGLfreeform. The code is attached. It is running but needs a cleaning up to remove errors like:
a) The undue lines connecting different isolines
b) The stack overflow when closing the screen
c) When I change from one example to another how to clean completely the previous one from the screen
d) Seems not to be difficult to write the values in the isolines but I still do not know how to do it.
Part of this code is based in the good material downloaded in Internet in these links (level curves using Conrec algorithm):
http://paulbourke.net/papers/conrec/
http://paulbourke.net/papers/conrec/coreconrect.dpr
Thanks to the work of Nicholas Yue CONREC.C , Paul D. Bourke CONREC.F and Alexander Weidauer. Here I tried to use the results of Conrec to draw isolines in a XY plane formed by a GLscene TGLfreeform.
Some more information in http://sourceforge.net/p/glscene/discussion/93606/
Using XE7
Figure missing in comment above (attached)
Code attached
Now some errors were solved but some remains.
Please help me with the following doubts
a) When I change from one example to another how to clean completely the previous one from the screen?
b) There is a stack overflow when closing the screen
c) Why doubled symectrical isolines are created ? The input data data is not symectrical
d) Seems not to be difficult to write the values in the isolines but I still do not know how to do it.
the screen
Hi,
This is an image generated by a application that I am currently working on.
If anyone is interested please comment.
Eric Hardinge
Hi Eric
Nice to hear from you. I am interested to receive your information here or in my email sergiofeitoza@cognitor.com.br .
I am trying to finish the code of this post with the isolines in the email but some doubts still remains like below. The main doubts are not in the mathematics but instead in easy (not for me) things.
In the example 3 I included your equation. Check what happened:
Maybe someone can help me with these doubts:
a) When I change from one example to another how to clean completely the previous one from the screen?
b) Why I have the error “stack overflow” when closing the screen clicking in the Close button
Thank you in advance . Code below and complete source code attached
Sergio
P.S: Any help in the post "temperatures mapping" is also welcome
The source code for XE7 attached
I am still fighting with the isolines. I replaced the GL lines by GLpoints so I can now see the lines (code and figure attached)
What I do not understand is why I am getting the stack overflow error when I close the program
In the CONREC algorithm procedure I am trying to identify which is the variable which gives the value of each level isoline.I need this to write the value in the scene
Any help is welcome
The code
The figure
Sergio,
I see that you're included own conrec in your form. You can use one that is in GLIsolines unit of GLScene.
PW
Thanks Paul
I did not see it was there . I will check and try to use it
Hi Paul I read the GLisolines unit . I think I have to call MakeIsolines but not sure
Do you some lines of code calling the procedure or even a short demo ?
Thank you in advance
I could use the CONREC inside GLisolines. A certain small work to get the values inside text file F manipiulating strings but OK
The results are equal to before
The isolines.pas procedure in GLscene is very useful. It seems that a detail is missing to enable a complete use with GLisolines
With the current procedure we can generate all the points of the isolines (not ordered) and this is what is returned in the var F (file text) .Doing this and using GLponts to obtain the result attached which is an incomplete solution (see attachment)
procedure Conrec(Data: TGLMatrix; ilb, iub, jlb, jub: Integer; X: TGLVector; Y: TGLVector; NC: Integer; Z: TGLVector; var F: Text);
To do the right thing I need to use TGLlines for each isoline I did first a small “txt” routine to separate the values which will compose each isoline.
Then for each isoline I have now a sub-F file .
To enable to use a TGLline to draw the isoline I need to sort this file by “neighbor points”.
So, what I need is a fast routine that takes the sub-F file and sort these points neighbor by neighbor. Do you have this ?
I tried to look inside isolines.pas and I saw there are many things there but could not identify this