The objective is to use the command createpts/poisson_disk on a circle polygon. Various arguments are used to show how they work. The LaGriT command file includes the following steps:
The following LaGriT command files are used (.txt appended to names so browser can display):
LaGriT macro called by main: user_resolution_2.mlgi
Click on images for full size views.
Build a unit circle polygon with number of points (NP) = 17. One node will be removed because vertices are distributed from 0-360 degrees so last overlaps first. The command ‘filter’ removes the duplicate vertex.
define / NP / 17
cmo / create / mo_pts / / / tet
createpts/rtz/ 1,NP,1 /1.,0.,0./1.,360.,0./1,1,1/
cmo / printatt / mo_pts / -xyz- / minmax
filter / 1 0 0
rmpoint / compress
dump / avs / tmp_polygon_circle_16.poly / mo_pts / 1 0 0 0
Connect the vertices into triangles and add the min edge length attribute “emin”.
define / H_SCALE / 0.1
createpts / poisson_disk / 2d_polygon / mo_poisson_disk / mo_polygon &
/ H_SCALE / connect
quality / edge_min / y
dump / avs / output02_triangle_h_0.1.inp / mo_poisson_disk
Connect the vertices into triangles and add the min edge length attribute “emin”.
define / H_SCALE / 0.05
createpts / poisson_disk / 2d_polygon / mo_poisson_disk / mo_polygon &
/ H_SCALE / connect
quality / edge_min / y
dump / avs / output03_triangle_h_0.05.inp / mo_poisson_disk
define / H_SCALE / 0.01
define / 10H_SCALE / 0.1
createpts / poisson_disk / 2d_polygon / mo_poisson_disk / mo_polygon &
/ H_SCALE / connect / user_resolution_1.mlgi
quality / edge_min / y
dump / avs / output04_triangle_variable_1.inp / mo_poisson_disk
define / H_SCALE / 0.01
define / 10H_SCALE / 0.1
createpts / poisson_disk / 2d_polygon / mo_poisson_disk / mo_polygon &
/ H_SCALE / connect / user_resolution_2.mlgi
quality / edge_min / y
dump / avs / output05_triangle_variable_2.inp / mo_poisson_disk
Reading the “lagrit.out” and screen output, the min edge results can be viewed. Shown below is the quality report of min edge lengths for user_resolution_2.mlgi used in Step 5.
quality/edge_min/y epsilonl, epsilonaspect: 6.2803698E-13 2.4771691E-37 -------------------------------------------- Edge min normalized by dividing with max value. element norm min edge length < .01: 0 element norm edge length b/w .01 and .02: 0 element norm edge length b/w .02 and .05: 0 element norm edge length b/w .05 and .1 : 340 element norm edge length b/w .1 and .2 : 7110 element norm edge length b/w .2 and .5 : 1931 element norm edge length b/w .5 and 1. : 329 min min edge length = 0.8143E-02 max min edge length = 0.1118E+00 ----------------------------------------------------------- 9710 total elements evaluated. dump/avs/output05_triangle_variable_2.inp/mo_poisson_disk