ASPL Programming ver 1.00
© 2024 Bassem W. Jamaleddine


11-11

   RANDOM POLYGONS ON THREE SPHERES

[RANDOM POLYGONS ON THREE SPHERES]

WORKSPACE POLY3CLOUDS 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 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. 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> 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;dumpgad S12;dumpgad S23;dumpgad S123_100

The following figures are generated to show ASPL on doing set intersection and difference on geometric data sets.

       Figure S123_100-troth-img3D.png
full view

Image File

 -F- Fig. 11.11.1   [Figure RANDOM POLYGONS ON THREE SPHERES IN 3D SPACE]
ASPL (C) 2024 Bassem Jamaleddine

       Figure S123_100-troth-img2D.png
full view

Image File

 -F- Fig. 11.11.2   [Figure RANDOM POLYGONS ON THREE SPHERES IN 2D SPACE]
ASPL (C) 2024 Bassem Jamaleddine

       Figure S123-intersect-img3D.png
full view

Image File

 -F- Fig. 11.11.3   [Figure ASPL GEO-INTERSECTION SHOWING THE INTESECTIONS f& S1 S2 S3 OF THE RANDOM POLYGONS ON THE THREE SPHERES]
ASPL (C) 2024 Bassem Jamaleddine

       Figure S123_100-with-intersect-img3D.png
full view

Image File

 -F- Fig. 11.11.4   [Figure ASPL GEO-INTERSECTION FOR RANDOM POLYGONS ON THREE SPHERES IN 3D SPACE - FILLED SQUARE POINTS SHOWING THE INTERSECTIONS]
ASPL (C) 2024 Bassem Jamaleddine

       Figure S123_100-with-intersect-img2D.png
full view

Image File

 -F- Fig. 11.11.5   [Figure ASPL GEO-INTERSECTION FOR RANDOM POLYGONS ON THREE SPHERES IN 2D SPACE - FILLED SQUARE POINTS SHOWING THE INTERSECTIONS]
ASPL (C) 2024 Bassem Jamaleddine

This example is shown in the following terminal.

       terminal for example: RANDOM POLYGONS ON THREE SPHERES
viewme

 -E- Display. 11.11.1   [RANDOM POLYGONS ON THREE SPHERES][RANDOM POLYGONS ON THREE SPHERES]
Terminal showing RANDOM POLYGONS ON THREE SPHERES