summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/irregularcontour.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/irregularcontour.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/irregularcontour.asy8
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/texmf/doc/asymptote/examples/irregularcontour.asy b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
index b72ddd0e08b..70b38ae15e7 100644
--- a/Master/texmf/doc/asymptote/examples/irregularcontour.asy
+++ b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
@@ -4,13 +4,15 @@ size(200);
int n=100;
-pair[] points=new pair[n];
-real[] values=new real[n];
-
real f(real a, real b) {return a^2+b^2;}
+srand(1);
+
real r() {return 1.1*(rand()/randMax*2-1);}
+pair[] points=new pair[n];
+real[] values=new real[n];
+
for(int i=0; i < n; ++i) {
points[i]=(r(),r());
values[i]=f(points[i].x,points[i].y);