Tool that simulates two-dimensional sample distribution based on a sample defined mesh
GitHub: https://github.com/YujiSODE/meshRandom
Copyright (c) 2020 Yuji SODE <yuji.sode@gmail.com>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php
Figure 1. Four sample data sets and simulated random coordinates.
A. data set model:
y=3.0*x+5.0
.B. data set model:
y=3.0*x+5.0*U
where U
is random number in (0,1)
.C. data set model:
y=sin(x)
.D. data set model:
(x,y)=(0.25*cos(n*π/2.0),0.25*sin(n*π/2.0))
where n=0,1,2,...
.y^
is simulated random coordinates.
Tool that simulates two-dimensional sample distribution based on a sample defined mesh.
tclsh meshRandom.tcl N xyList;
-
::meshRandom::randoms N xyList;
$N
: number of random coordinates to return$xyList
: a list of xy-coordinate data, and every element is expressed asx,y
Supposing that two-dimensional sample distribution is composed of four sample points P1 to P4.
Sample points P are linked by paths F.
Random coordinates P^ are generated along a path Fij.
P^ is included within a distribution P1P2P3P4.
meshRandom
.Filled circles show sample points. Red lines show sample paths
Fij
beteween two sample points Pi
and Pj
.
It requires Tcl 8.6+.
- Sode, Y. 2018. lSum_min.tcl: https://gist.github.com/YujiSODE/1f9a4e2729212691972b196a76ba9bd0
- Sode, Y. 2018. lPairwise_min.tcl; the MIT License: https://gist.github.com/YujiSODE/0d520f3e178894cd1f2fee407bbd3e16