diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-19 23:59:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-19 23:59:33 +0000 |
commit | dddce3148a2bc785603576b18ffcf72d39adbe47 (patch) | |
tree | 14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/doc/irregularcontour.asy | |
parent | a01e51b01f5819b6091af48cdca581e9f2a9282e (diff) |
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/doc/irregularcontour.asy')
-rw-r--r-- | Build/source/utils/asymptote/doc/irregularcontour.asy | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/doc/irregularcontour.asy b/Build/source/utils/asymptote/doc/irregularcontour.asy index b72ddd0e08b..70b38ae15e7 100644 --- a/Build/source/utils/asymptote/doc/irregularcontour.asy +++ b/Build/source/utils/asymptote/doc/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); |