ASPL Manual v 1.00
© 2024 by SetSphere.COM


11-12

   RANDOM POLYGONS IN THREE 2D PLANES

[RANDOM POLYGONS IN THREE 2D PLANES]

WORKSPACE POLY3PLANES 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\ to do contextual set intersection and set difference according to contextual routines, here are the GEOmetric routines put at work. In this example the random polygons in three 2D planes are being intersected and are being differentiated. 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
    (ping the GEOPLANES container)

②  aspl> ks x1 y1 x2 y2 x3 y3
    (set the ks vector to shorten the displayed data )

③  aspl> T123_70 = ggRPI3Pov(N,70,glb1,T1,glb2,T2,glb3,T3,nmfl,T123_70)
    (get random polygons in 3 planes also generate named data in ~tmp)

④  aspl> split T123_70 into T1 T2 T3
    (split the variable T123_70 for the three planes)

⑤  aspl> f& T1 T2 T3
    (intersect the three planes)

⑥  aspl> f\ T1 T2 T3
    (get the difference between 1st plane and the other two planes)

⑦  aspl> ans
    (see the answer stack)

⑧  aspl> pop T1_23
    (pop the stack result into variable T1_23)

⑨  aspl> pop T123
    (pop the stack result into variable T123)

⑩  aspl> ans
    (see the answer stack)

⑪  aspl> v
    (display the variables in the symbol table)

⑫  aspl> dumpgad T123_70
    (dump GADg of T123_70 writing it to a file in ~tmp directory)

⑬  aspl> dumpgad T1_23
    (dump GADg of T1_23 writing it to a file in ~tmp directory)

⑭  aspl> dumpgad T123
    (dump GADg of T123 writing it to a file in ~tmp directory)

⑮  aspl> hs
    (see history of commands)

⑯  aspl> bye
    (this will save everything)

You may need to reinstall the sample and skip executing ggRPI3Pov(), since

ggRPI3Pov() generates random triangles the result will be different from the

figures. Also you would rather 'quit' instead 'bye' so no data is updated

in the workspace.

Change to ASPL ~tmp and issue the commands shown after the #

# drawgad -gad T123-gad-aspl.tobj

gpdata3 T123_T1.dat,1:2wl T123_T2.dat,1:2wl T123_T3.dat,1:2wl

# drawgad -gad T1_23-gad-aspl.tobj

gpdata3 T1_23_P3.dat,1:2wl

THE DRAWING COMMANDS USED IN THE CAPTURES:

# gpdata3 T123_T1.dat,1:2wl-rgb-red T123_T2.dat,1:2wl-rgb-blue T123_T3.dat,1:2wl-rgb-green -title "ASPL GEO-INTERSECTION FOR THE RANDOM TRIANGLES IN THREE 2D PLANES"

# gpdata3 T123_70_1.dat,1:2wl-rgb-red T123_70_2.dat,1:2wl-rgb-blue T123_70_3.dat,1:2wl-rgb-green -title "RANDOM TRIANGLES IN THREE 2D PLANES"

# gpdata3 T123_70_1.dat,1:2wl-rgb-red T123_70_2.dat,1:2wl-rgb-blue T123_70_3.dat,1:2wl-rgb-green T123_T1.dat,1:2wp-pt-4-ps-1.7-rgb-red T123_T2.dat,1:2wp-pt-4-ps-1.7-rgb-blue T123_T3.dat,1:2wp-pt-4-ps-1.7-rgb-green -title "ASPL GEO-INTERSECTION CONTRASTED WITH SQUARE POINTS FOR THE RANDOM TRIANGLES IN THE THREE 2D PLANES"

# gpdata3 T123_T1.dat,1:2wl-lt-4-lw-1.9-rgb-red -title "ASPL GEO-INTERSECTION SHOWING INTERSECTING TRIANGLES IN 1st PLANE"

# gpdata3 T1_23_T1.dat,1:2wl-lw-0.5 -title 'ASPL GEO-DIFFERENCE f\\\ T1 T2 T3 - SHOWING 1st PLANE DISJOINTNESS WITH THE 2nd AND 3rd PLANES'

# gpdata3 T1_23_T1.dat,1:2wl-lw-0.5 T123_T1.dat,1:2wl-lt-4-lw-1.9-rgb-red -title 'ASPL GEO-DIFFERENCE f\\\ T1 T2 T3 PLUS THE EXCLUDED INTERSECTS IN THE 1st PLANE - 1st PLANE DISJOINTNESS + HIGHLIGHTED INTERSECTS'

       Figure T123_70-troth-img.png
full view

Image File

 -F- Fig. 11.12.1   [Figure RANDOM TRIANGLES IN THREE 2D PLANES]
ASPL (C) 2024 Bassem Jamaleddine

       Figure T123-troth-planes-intersect-img.png
full view

Image File

 -F- Fig. 11.12.2   [Figure ASPL GEO-INTERSECTION FOR THE RANDOM TRIANGLES IN THREE 2D PLANES]
ASPL (C) 2024 Bassem Jamaleddine

       Figure T123_70-troth-and-intesect-img.png
full view

Image File

 -F- Fig. 11.12.3   [Figure ASPL GEO-INTERSECTION CONTRASTED WITH SQUARE POINTS FOR THE RANDOM TRIANGLES IN THE THREE 2D PLANES]
ASPL (C) 2024 Bassem Jamaleddine

       Figure T123-1st-plane-intersect-img.png
full view

Image File

 -F- Fig. 11.12.4   [Figure ASPL GEO-INTERSECTION SHOWING INTERSECTING TRIANGLES IN 1st PLANE]
ASPL (C) 2024 Bassem Jamaleddine

       Figure T123-1st-plane-disjointness-img.png
full view

Image File

 -F- Fig. 11.12.5   [Figure ASPL GEO-DIFFERENCE f\\\ T1 T2 T3 - SHOWING 1st PLANE DISJOINTNESS WITH THE 2nd AND 3rd PLANES]
ASPL (C) 2024 Bassem Jamaleddine

       Figure T123-1st-plane-disjointness-plus-intersect-img.png
full view

Image File

 -F- Fig. 11.12.6   [Figure ASPL GEO-DIFFERENCE f\\\ T1 T2 T3 PLUS THE EXCLUDED INTERSECTS IN THE 1st PLANE - 1st PLANE DISJOINTNESS + HIGHLIGHTED INTERSECTS]
ASPL (C) 2024 Bassem Jamaleddine

This example is shown in the following terminal.

       terminal for example: RANDOM POLYGONS IN THREE 2D PLANES
viewme

 -E- Display. 11.12.1   [RANDOM POLYGONS IN THREE 2D PLANES][RANDOM POLYGONS IN THREE 2D PLANES]
Terminal showing RANDOM POLYGONS IN THREE 2D PLANES