ASPL Manual v 1.00
© 2024 by SetSphere.COM
[RANDOM POLYGONS ON TWO SPHERES]
WORKSPACE POLY2CLOUDS DESCRIPTION:
This workspace 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 its f& and f\ operators 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 ggRPO2Sov() to create 170 polygons, namely triangles, on two spheres. The result is assigned to G12_170, and the labeling of the first sphere is G1, and of the second sphere is G2. We will split the resulting set variable G12_170 into two set variables G1 and G2: G1 contains the first sphere polygons, and G2 contains the second sphere polygons. We will call f& on G1 and G2 to get their intersects, and assign the result to G12. We will call f\ on G1 and G2 to get their difference, and assign the result to G1_2. We will call f\ on G2 and G1 to get their difference, and assign the result to G2_1. The merge operation shown below is not required with latest version of ASPL. The merge of a variable into itself will just add a GADg to the variable, but if it is not needed then spare the memory. Finally we will dump the GADg of the variables so that we can plot them with drawgad command. Read the ASPL book on how to create GEO workspaces. In this tutorial the 'aspl>' refers to the ASPL prompt, and the '#' refers to the shell prompt.
① aspl> timeout 60
(set timeout to 60 seconds)
② aspl> G12_170 = ggRPO2Sov(N,170,glb1,G1,glb2,G2,nmfl,G12_170)
(generate random polygons on two spheres)
③ aspl> split G12_170 into G1 G2
(split the variable G1 and G2 for each sphere)
④ aspl> G12 = f& G1 G2
(intersect both spheres)
⑤ aspl> G1_2 = f\ G1 G2
(difference of polygons between G1 and G2)
⑥ aspl> G2_1 = f\ G2 G1
(difference of polygons between G2 and G1)
⑦ aspl> merge G12 into G12; merge G1_2 into G1_2; merge G2_1 into G2_1
(needed only with beta version)
⑧ aspl> dumpgad G12_170; dumpgad G12; dumpgad G1_2; dumpgad G2_1
(dump GEO gads of these variables)
The following figures are generated to show ASPL on doing set intersection and difference on geometric data sets.
Figure G12_170-both-all-img3D.png
Figure G12_170-both-all-img2D.png
Figure G12-both-disjointness-img3D.png
Figure G12-G1only-img2D.png
Figure G12-G1only-img3D.png
Figure G12-G2only-img2D.png
Figure G12-G2only-img3D.png
Figure G12-both-intersect-perpendicularZ-img3D.png
Figure G12-both-intersect-img3D.png
Figure G12-both-intersect-img2D.png
This example is shown in the following terminal.
terminal for example: RANDOM POLYGONS ON TWO SPHERES