ASPL User's Guide v 1.00
© 2024 by SetSphere.COM
12-1
GEO Set Operations
The sample workspace POLY3CLOUDS shows how to use ASPL operators to do contextual set operations on geometric data. Worspaces that have a name suffixed with GEO causes ASPL to switch it f& and f\ to do contextual set intersection and set difference according to contextual routines, here they are the GEOmetric routines.This workspace shows the power of ASPL set operators when performing operations on geometric data set. In this example we will call the GG function ggRPO3Sov() to create 100 polygons, namely triangles, on three spheres. The result is assigned to S123_100, and the labeling of the spheres are S1, S2, and S3. We will split the resulting set variable S123_100 into three set variables S1, S2, and S3. We will call f& on S1 and S2 to get their intersects, and the result is pushed on the stack. We will call f& on S1 and S3 to get their intersects, and the result is pushed on the stack. We will call f& on S1 and S3 to get their intersects, and the result is pushed on the stack. We will call f& on S1 S2 S3 to get their intersects, and the result is pushed on the stack. We will pop the stack and assign the results to S123, S23, S13, S12, S23 respectively. Finally we will dump the GADg of the variables so that we can plot them with drawgad command.
On the UNIX prompt start ASPL by loading the sample workspace POLY3CLOUDS:
# aspl -wsname POLY3CLOUDS -groupingclass GEOSPHERES
At the ASPL prompt issue the following commands:
① aspl> egCwhoami
② aspl> ks x1 y1 z1 x2 y2 z2 x3 y3 z3
③ aspl> S123_100 = ggRPO3Sov(N,100,hurst,2.37,glb1,S1,glb2,S2,glb3,S3,nmfl,S123_100)
④ aspl> split S123_100 into S1 S2 S3
⑤ aspl> v
⑥ aspl> f& S1 S2
⑦ aspl> f& S1 S3
⑧ aspl> f& S2 S3
⑨ aspl> f& S1 S2 S3
⑩ aspl> ans
⑪ aspl> pop S123
⑫ aspl> pop S23
⑬ aspl> pop S13
⑭ aspl> pop S12
⑮ aspl> pop S23
⑯ aspl> ans
⑰ aspl> v
⑱ aspl> dumpgad S123
⑲ aspl> dumpgad S12
⑳ aspl> dumpgad S23
⑴ aspl> dumpgad S123_100
Figure S123_100-troth-img3D.png
Figure S123_100-troth-img2D.png
Figure S123-intersect-img3D.png
Figure S123_100-with-intersect-img3D.png
Figure S123_100-with-intersect-img2D.png
This example is shown in the following terminal.
terminal for example: RANDOM POLYGONS ON THREE SPHERES