cgal/Bounding_volumes/archive/test_extensive/stability/maple/balls-on-boundary-3.mws

35 lines
2.3 KiB
Plaintext

{VERSION 5 0 "SUN SPARC SOLARIS" "5.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0
1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0
0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 }
{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal
" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0
-1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1
-1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0
0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1
0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple O
utput" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3
3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 256 55 "Generates the balls for t
he testsuite balls-on-boundary" }{TEXT -1 29 "\n26 June 2002, Kaspar F
ischer" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "restart;\nwith(pl
ottools):\nwith(linalg):\nDigits:= 12;" }}{PARA 7 "" 1 "" {TEXT -1 80
"Warning, the protected names norm and trace have been redefined and u
nprotected\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'DigitsG\"#7" }}}
{EXCHG {PARA 0 "" 0 "" {TEXT -1 195 "Generate balls which touch the un
it sphere in such a way that the touching points are uniformly distrib
uted on the sphere: (See for instance http://mathworld.wolfram.com/Sp
herePointPicking.html)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 363 "
N:= 10000:\nrs1:= evalf([stats[random,uniform](N)]):\nrs2:= evalf([sta
ts[random,uniform](N)]):\ntheta:= map(x->evalf(2*Pi*x),rs1):\nphi:= \+
map(x->evalf(arccos(2*x-1)),rs2):\nrho:= [stats[random,uniform](N)]:\n
px:= [seq((1-rho[i])*cos(theta[i])*sin(phi[i]),i=1..N)]:\npy:= [seq(
(1-rho[i])*sin(theta[i])*sin(phi[i]),i=1..N)]:\npz:= [seq((1-rho[i])*
cos(phi[i]),i=1..N)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 172 "f
d:= fopen(`balls_on_boundary_3.data`,WRITE):\nfprintf(fd,`%d\\n`,N);\n
for i from 1 to N do\n fprintf(fd,`%.12e %.12e %.12e %.12e\\n`,px[i],
py[i],pz[i],rho[i]):\nod:\nfclose(fd):" }}{PARA 11 "" 1 "" {XPPMATH
20 "6#\"\"'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG
{PARA 0 "" 0 "" {TEXT -1 10 "That's it." }}}}{MARK "3 0 0" 123 }
{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }