Is there any way to have my points in the mesh file written in
spherical coordinates?
Khaled Obeidat
Research Engineer
EMAG Technologies, Inc.
www.emagtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030905/3f040fd3/attachment.htm
[GiDlist] spherical coordinates
Moderator: GiD Team
[GiDlist] spherical coordinates
You must calculate the spherical coordinates from the cartesian coordinates, for example, write a file named
'spherical.bas' with this content:
*loop nodes
*set var x=nodescoord(1)
*set var y=nodescoord(2)
*set var z=nodescoord(3)
*set var r=operation(sqrt(x*x+y*y+z*z))
*set var rproj=operation(sqrt(x*x+y*y))
*if(rproj0)
*set var anglexy=operation(acos(x/rproj))
*set var anglez=operation(asin(z/r))
*else
*set var anglexy=0
*if(z0)
*set var anglez=*operation(3.141592654/2.0)
*else
*set var anglez=*operation(-3.141592654/2.0)
*endif
*endif
*r *anglexy *anglez
*end nodes
Copy this file inside the directory /templates , and use it File-Export-Using template .bas (only mesh)
Note: the nodes with this template are written in radians
Regards
Enrique Escolano
----- Original Message -----
From: Khaled Obeidat
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 05, 2003 11:27 PM
Subject: [GiDlist] spherical coordinates
Is there any way to have my points in the mesh file written in spherical coordinates?
Khaled Obeidat
Research Engineer
EMAG Technologies, Inc.
www.emagtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030908/0bcba204/attachment.htm
'spherical.bas' with this content:
*loop nodes
*set var x=nodescoord(1)
*set var y=nodescoord(2)
*set var z=nodescoord(3)
*set var r=operation(sqrt(x*x+y*y+z*z))
*set var rproj=operation(sqrt(x*x+y*y))
*if(rproj0)
*set var anglexy=operation(acos(x/rproj))
*set var anglez=operation(asin(z/r))
*else
*set var anglexy=0
*if(z0)
*set var anglez=*operation(3.141592654/2.0)
*else
*set var anglez=*operation(-3.141592654/2.0)
*endif
*endif
*r *anglexy *anglez
*end nodes
Copy this file inside the directory /templates , and use it File-Export-Using template .bas (only mesh)
Note: the nodes with this template are written in radians
Regards
Enrique Escolano
----- Original Message -----
From: Khaled Obeidat
To: gidlist at gatxan.cimne.upc.es
Sent: Friday, September 05, 2003 11:27 PM
Subject: [GiDlist] spherical coordinates
Is there any way to have my points in the mesh file written in spherical coordinates?
Khaled Obeidat
Research Engineer
EMAG Technologies, Inc.
www.emagtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listas.cimne.upc.edu/pipermail/gidlist/attachments/20030908/0bcba204/attachment.htm