Home

Manual

image

Contents

1. gt define a list 1 3 2 4 gt list ref a 0 1 Chapter 3 Quick Tour 8 gt map square a 1 9 4 16 gt apply max a 4 gt sort a lt 1 2 3 4 As a simple example ley us graph sin x in the range 2Pi lt x lt 2Pi We first store the values from 2 Pi to 2 Pi in a list with 100 points gt define x M_2PI M_2PI 100 The colon function creates a list of 100 numbers evenly distributed from 2Pi to 2Pi We then create a new list that applies sin element by element to x gt define y map sin x To plot these points we do gt ezgraph x y This will create a simple graph using x and y as coordinates 1 099862 4 0 659917 0 219972 0 219972 0 659917 1 099862 r 6 28318 3 76991 1 25663 1 25663 3 76991 6 28318 3 5 Vectors matrices and the Scientific Repository SENSAWAVE also supports a number of different homogenous vector types that are of ten more efficient for numerical operations For example we can create a complex single precision vector like this gt define C c32vector 5 7 8 M_PI 12 5 1 0i This vector has five elements We can also create vectors from lists such as those generated by the colon operator gt define B list gt c32vector 1 5 5 Let us calculate the scalar product of these two vectors using the BLAS function cdotu BLAS Basic Linear Algebra Subprograms is a library routines that provide standard building blocks for performing
2. examples graph linear Example linear graph 0 9 0 7 0 5 0 3 Sinc function 0 1 0 1 0 3 6 4 2 0 2 4 6 X coordinate 8 2 Example 2 Semi logarithmic graph The following is an example of a semi logarithmic graph examples graph semilog scm example of a semi logarithmic graph create the graph define g graph new 430 320 Set the origin graph aorigin g 1 2 0 9 select the font graph font g font new Set the style of the axis graph linearstyle g 4 0 5 1 5 graph logstyle g 2 10224 1 7 8 initialize the x and y axis 4 inches wide from 100 to 10000 Hz offset 0 1 inch graph xlog g 4 0 100 10000 0 1 3 inches high from 0 to 1 offset 0 1 inch graph ylinear g 3 0 0 0 1 0 0 1 0 1 2 draw a domain mesh graph color g Grey graph mesh g Chapter 8 Graphs 45 render the capacitance spetrum let R 1 0e6 C 1e 10 cnorm lambda f 1 1 1 0i M 2PI f R C graph color g Red graph moveto g 100 real part cnorm 100 let loop f 100 2 if f 10000 begin graph lineto g f real part cnorm f loop f 10 graph stroke g graph color g Blue graph moveto g 100 imag part cnorm 100 let loop f 100 if f 10000 begin graph lineto g f imag part cnorm f loop f 10 graph stroke g draw the x and y axis graph color g Black graph xaxis g graph yaxis g dra
3. graph color g Black draw the x and y axis graph xaxis g graph yaxis g draw the axis labels graph ylabel g Y coordinate graph xlabel g X coordinate draw a caption in physical coordinates graph setcoord g GRAPH_PHYS graph htextcenter g 1 5 3 2 Example 2D framebuffer graph show the graph on screen graph output g GRAPH_WIN Chapter 8 Graphs 50 This produces the following graph gt load examples graph image Example 2D framebuffer graph Y coordinate eo T T T T T T T T T T T T T T T 1 4 3 2 14 0 1 2 3 4 X coordinate 8 5 Quick data visualization While the graphing system in SENSAWAVE is capable of generating very complex presen tation quality graphs it can be overkill when data needs to be quickly visualized For this reason SENSAWAVE provides a function that automatically builds a simple graph from lists of data For example define f x sin 1 0 3i x define r random real 1 0i random real 0 5 0 5i define x 0 M_2PI 10 define y map lambda x f x r x define xi O M_2PI 100 define y1 map f x1 ezgraph x y x1 y1 V V VM NN NV Chapter 8 Graphs 51 This builds two sets of data lists a 10 element list x with a corresponding noisy represen tation y of the complex function f and a higher resolution rendering in x1 and y1 The result looks like this 3 960932 2 595864 1 230796 0 134272
4. loop cdr d draw an axis frame graph frame g Chapter 8 Graphs 48 draw the x and y axis graph xaxis g graph yaxis g draw the axis labels graph xlabel g The X axis label graph ylabel g The Y axis label show it on screen graph output g GRAPH WIN This produces the following graph gt load examples graph loglog 10 0 The Y axis label 10 0 The X axis label 8 4 Example 4 2D image graph We can combine the graphing system with framebuffers like this examples graph image scm example of a 2D image graph create a framebuffer with data define myfb framebuffer new 216 216 let loop x 0 y 0 if lt y 216 let mewx if lt x 215 x 1 00 Chapter 8 Graphs 49 newy if newx 0 y 1 y rx 9 x 27 4 ry C y 27 4 framebuffer pixel myfb x y color gradient GRADIENT RAINBOW sinc sqrt rx rx ry ry 0 3 1 3 loop newx newy framebuffer pixel myfb O O Black define g graph new 320 320 Set the origin graph aorigin g 1 0 0 9 select the font graph font g font new Set the style of the log axis graph linearstyle g 4 0 5 1 5 initialize the axis 3 inches wide from 4 to 4 offset O inch tick every 5 label every 2 tick graph xlinear g 3 0 4 4 0 1 5 2 graph ylinear g 3 0 4 4 0 1 5 2 draw a domain mesh graph framebuffer g 4 4 myfb
5. 1 499340 2 864408 r T T T T T T T T 0 00000 1 25663 2 51327 3 76991 5 02654 1 6 28318 SENSAWAVE also supports a real time rendering construct intended mainly for direct display of measured data For example gt rtgraph 20 lambda t cos t exp 0 9i t 0 5 This opens a graph containing 20 data points that updates in real time by applying the function argument every 0 5 seconds The function parameter is the elapsed time in seconds 1 192119 4 0 681355 0 170591 0 340174 3 0 850938 4 1 861702 r T T T T T T T T 79 7372 81 6752 83 6132 85 5512 87 4892 1 89 4272 Chapter 9 OpenGL 52 9 OpenGL SENSAWAVE supports direct programming in OpenGL The glwindow open call can be used to open a window and specify a callback to handle the rendering and input events of the window This example below creates a simple rendering of an OpenGL shaded polygon examples opengl scm Simple opengl rendering of a smooth shaded polygon the OpenGL window event handler define opengl eventhandler current user interrupt handler lambda t let loop O let msg thread receive if list msg if length msg 4 let w car msg t cadr msg x caddr msg y cadddr msg cond t WINDOW KEYPRESS if x WINDOW KEYESCAPE glwindow close w t WINDOW CLOSE glwindow close w t WINDOW REDRAW glcontext grab grab the rendering context glconte
6. z1 1 0 2 0 color gradient GRADIENT RAINBOW z4 1 0 2 0 color gradient GRADIENT RAINBOW z2 1 0 2 0 color gradient GRADIENT_RAINBOW z3 1 0 2 0 loop newx newy render the framebuffer to a window plot2d gt glwindow p2 t This program opens a window with the framebuffer graphics gt load examples plot2d 7 3 Example 3D plotting primitives Framebuffer devices also support simplified 3D primitives The following example builds a 3D spherical plot with shading and color interpolation examples plot3d scm Examples of 3D primitives on framebuffers Chapter 7 Framebuffers 40 function to render define func u v 1 0 1 sin 5 v sin 10 u Setup the rendering define f framebuffer new 200 200 framebuffer clear f White define p3 plot3d new f 1 5 1 5 1 5 1 5 1 5 1 5 plot3d setview p3 O O 199 199 plot3d lookat p3 5 5 plot3d autoperspective p3 40 framebuffer noclip f plot3d start p3 plot3d clear p3 White plot3d rotu p3 50 plot3d rotz p3 60 plot3d up p3 4 plot3d right p3 2 plot3d lightat 0 5 0 5 1 draw the axis frame plotad quad p3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 Black plot3d quad p3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Black plot3d line p3 1 1 1 1 1 1 1 1 1 1 1 1 Black plot3d line p3 1 1 1 1 1 1 1 1 1 1 1 1 Black plot3d line p3 1 1 1
7. 12 74 84 the 2 1 2 1 3 gr 6 2 22 2 71 2 44 1 8 1 56 2 61 0 78 94 2 25 1 85 1 75 0 56 0 99 1 04 1 56 11 3 16 3 12 3 04 2 6 1 56 2 35 2 48 56 1 56 2 2 13 1 9 1 92 4 56 4 56 2 36 2 81 55 4 26 1 11 1 56 6 61 6 61 2 14 2 94 aph graph new 330 290 set the font graph font g font new Set the origin Chapter 8 Graphs graph aorigin g 1 1 0 75 set the style of the log axis graph logstyle g xb x7ff 4 3 4 8 initialize the log x and y axis graph xlog g 3 0 0 5 10 0 0 graph ylog g 3 0 5 10 0 0 draw a domain mesh graph color g Grey graph mesh g draw some lines graph color g Red graph linewidth g 0 6 a solid diagonal line graph moveto g 0 5 0 5 graph lineto g 10 10 graph stroke g dashed lines graph dash g define vLmin 6 0 1364 0 5 define vLmax 10 0 define vRmin 0 5 define vRmax 10 0 define ratio 1 5 graph moveto g vLmin ratio vRmin graph lineto g vLmax vRmax ratio graph moveto g vLmin vRmin ratio graph lineto g vLmax ratio vRmax graph stroke g graph dash g O 1 0 graph linewidth g 1 0 plot markers here let loop d data if gt length d 0 begin graph color g White 47 graph marker g car car d cadr car d GRAPH_SOLIDCIRCLE 10 graph color g Black graph marker g car car d cadr car d GRAPH_OPENCIRCLE 10
8. Fourier transform of periodic and other symmetric sequences They include complex real sine cosine and quarter wave transforms 5 6 4 EISPACK and SEISPACK EISPACK double precision and SEISPACK single precision are libraries of routines that compute the eigenvalues and eigenvectors of nine classes of matrices complex general complex Hermitian real general real symmetric real symmetric banded real symmetric tridiagonal special real tridiagonal generalized real and generalized real symmetric ma trices In addition routines are included that use singular value decomposition to solve certain least squares problems 5 6 5 LINPACK LINPACK is a library of routines that analyze and solve linear equations and linear least squares problems LINPACK solves linear systems whose matrices are general banded symmetric indefinite symmetric positive definite triangular and tridiagonal square In addition the library computes the QR and singular value decompositions of rectangular matrices and applies them to least squares problems Chapter 5 Scientific Repository 32 5 6 6 MINPACK MINPACK is a library of routines for solving nonlinear equations and nonlinear least squares problems The algorithms proceed either from an analytic specification of the Jacobian matrix or directly from the problem functions MINPACK includes facilities for systems of equations with a banded Jacobian matrix for least squares problems with a large amount
9. LAPACK_dgtsv 6 5 12 15 5 19 5 20 5 Expected 6 5 12 0 15 5 19 5 20 5 LAPACK zladiv 4 985037406483791 i 0 29925187032418954 Expecting 4 985037406483791 i 0 29925187032418954 The following code illustrates a simple interface to the general LAPACK solver gesv in all four precisions examples sci lapack2 scm interfacing the LAPACK s d c zlgesv solvers module require LAPACK generic wrapper for the gesv solvers define lapack solve A B 11 gt m m gt 1l gesv if and listlist A listlist B let n length car A n2 length A n3 length B bnrsh length car B if n n2 n3 let ma 11 m A mb 11 gt m B mp make s32vector n 0 gesv n bnrsh ma n mp mb n 0 m gt 11 mb error illegal array dimensions Chapter 5 Scientific Repository 26 error arguments must be lists of lists the specific solvers for all precisions define lapack solvef32 A B lapack solve A B listlist gt f32matrix f32matrix listlist LAPACK_sgesv define lapack solvef64 A B lapack solve A B listlist gt f64matrix f64matrix gt listlist LAPACK dgesv define lapack solvec32 A B lapack solve A B listlist c32matrix c32matrix gt listlist LAPACK cgesv define lapack solvec64 A B lapack solve A B listlist c64matrix c64matrix listlist LAPACK zgesv The same can be accomplished in C Java style examples sci lapack2 six interfacing the LAPACK s d c zlgesv so
10. is copyright C 2007 2008 Sen saWave Technology Inc The Software is protected by the copyright laws of Canada In downloading configuring or using the Software you are not obtaining title to the Software or any copyrights You may not sublicense rent lease convey distribute copy modify translate convert to another programming language decompile or disassemble the Soft ware for any purpose You may not redistribute the Software By installing the Software you are agreeing to this license and disclaimer Conditioned on your honoring the terms of this agreement SensaWave grants you a non exclusive non transferable license to use the present version of the Software including the accompanying documentation for your lawful non infringing use on a single computer at a single physical site in accordance with this Agreement You may make up to two exact unmodified copies of the Software solely for your own back up or archival use THIS SOFTWARE IS PROVIDED BY SENSAWAVE TECHNOLOGY INC AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIM ITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL SEN SAWAVE TECHNOLOGY INC BE LIABLE FOR ANY DIRECT INDIRECT INCIDEN TAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOW
11. with the user libpng versions 0 97 January 1998 through 1 0 6 March 20 2000 are Copyright c 1998 1999 Glenn Randers Pehrson and are distributed according to the same disclaimer and license as libpng 0 96 with the following individuals added to the list of Contributing Authors Tom Lane Glenn Randers Pehrson Willem van Schaik Chapter 12 Copyright Information 60 libpng versions 0 89 June 1996 through 0 96 May 1997 are Copyright c 1996 1997 Andreas Dilger Distributed according to the same disclaimer and license as libpng 0 88 with the following individuals added to the list of Contributing Authors John Bowler Kevin Bracey Sam Bushell Magnus Holmgren Greg Roelofs Tom Tanner libpng versions 0 5 May 1995 through 0 88 January 1996 are Copyright c 1995 1996 Guy Eric Schalnat Group 42 Inc For the purposes of this copyright and license Contributing Authors is defined as the following set of individuals Andreas Dilger Dave Martindale Guy Eric Schalnat Paul Schmidt Tim Wegner The PNG Reference Library is supplied AS IS The Contributing Authors and Group 42 Inc disclaim all warranties expressed or implied including without limitation the warranties of merchantability and of fitness for any purpose The Contributing Authors and Group 42 Inc assume no liability for direct indirect incidental special exemplary or consequential damages which may result from the use of the PNG Refere
12. 0i 1 0i 41 0i1 define Y make c64matrix 3 1 BLAS zgemv N c64matrix rows M c64matrix columns M 1 0 M c64matrix rows M X 1 0 0 Y 1 display BLAS_zgemv pp c64matrix gt listlist Y display Expecting 0 1 i 0 43 i 0 3 i n n Try loading this program gt load examples sci blas scm BLAS sdot 42 Expecting 42 Chapter 5 Scientific Repository 23 BLAS_dgemm 367 76 368 12 674 06 674 72 Expecting 367 76 368 12 674 06 674 72 BLAS_cgemv 0 1 i 0 3 i 0 3 i Expecting 0 1 i 0 43 i 0 3 i BLAS_zgemv 0 1 i 0 43 i 0 3 i Expecting 0 1 i 0 43 i 0 3 i The following code illustrates a simple interface to the general BLAS multiplier gemm in all four precisions examples sci blas2 scm interfacing the s d c z gemm BLAS multipliers module require BLAS generic wrapper for the gemm multipliers define blas multiply A B 11 gt m m gt 11 mmake gemm if and listlist A listlist B let a_r length A a_c length car A b_r length B b_c length car B if a_c b_r let ma 11 gt m A mb 11 gt m B mc mmake a_r b_c 0 gemm N N a_r b_c a_c 1 0 ma a_r mb a_c 0 0 mc a_r m gt 11 mc error inner matrix dimension mismatch error arguments must be lists of lists multipliers for all precisions define blas multiplyf32 A B blas multiply A B listlist gt f32matrix
13. applications is not in direct competition with the Software and that such applications do not include any form of an interactive com mand interface and further that such applications only include the minimum subset of the Software needed to make such applications work No part of the Software documentation can be deployed as part of any such applications You may make up to two exact unmodified copies of the Software solely for your own back up or archival use THIS SOFTWARE IS PROVIDED BY SENSAWAVE TECHNOLOGY INC AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIM ITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL SEN SAWAVE TECHNOLOGY INC BE LIABLE FOR ANY DIRECT INDIRECT INCIDEN TAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIA BILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSL BILITY OF SUCH DAMAGE Index Index TID 7 Po te T oi file extension 0 06 ler reg 18 Sem file extension eee seriei 14 six file extension 2 22 cena tesa tesa 14 TELE 8 Wah durs URS 260 cae Maeda geet
14. ee adage eee 20 2 2D framebuffer graph example 12 48 2D framebuffer primitives 38 3 3D framebuffer example 12 3D framebuffer primitives 39 A APPLY esate ice r4 skids DERE ESPERE ENS 7 ARPACK 21 45 14p REP ege ERES Beh 31 B Basic command line syntax 0 6 BLAS examples SD Lehr REPRE 21 BLAS numerical library 00 8 BEAS 6dobu 5 vengo tci das ae Svat dA d 8 BLAS CBemm enemies b eee gale oe anke Lees 23 BLAS CEMT a3 fh 03 Site tee als d E de ese spes 21 BLAS dgemm i is M pn rem pere S 21 23 BLAS Sdot enden aiaa aeeai etd diee eoque 2 BLAS Sgemm i bed RR Po ep ERA 2d BLAS ZOO GA e eet eco atiende aa ro dne es 9 BLAS zgemm iic ierre orainik uh eser e RES dg 23 BLAS ZBemy set xindi2s ARBETE ES oats PAI C C Java programming example 15 66 C Java programming style 00006 2 COLVECE ON 5 5 sese eis ta ee b o oen nes 8 664V6CtOE vire eda ee do a dotar beo 9 CDELDLIB esee pr ert e o Rc nE 3l CDROM distribution eere men 3 COlor al pha siepe irtani ienien aana 35 COlor Dlue n dre Enee ERES eps 35 color gradi nt 2 sas lige beer e RE dg 36 COlor gr en iie 922449 SAGE PLE RR 35 color red 412 pA eh Chews eee Diaa eia 35 COlOr Efgb iei Vie dia gees pe EEEE 36 COlOZ rBba 2e gg eee ees ee a ee el 36 color rgbaf i lzili4ssew Re be erem pens s 36 COlOr rB
15. eo a 14 font delet e eret Rated 34 fONT NAME ereer torrit ener ee TI YER 34 FONCNEW ise eae aaa tie eee es 34 font size e sek hee EE Hees eee oF 34 font string scent idle e eee 34 font stringd scent i vll de 4 ewe nebo 34 font stringwidth i c bids rb Re Ee 34 PONG ttc E E aeeecd 34 HONS E EUR 34 Fourier approximation to a square wave 14 Framebuffer graphics 0 000e eee JN framebuffer gt glwindow 37 framebuffer cle r cerier it rmn 3T framebuffer drawstring 37 framebuffer new see eee 3T framebuffer savePNG slss esses 3T framebuffer solidbox 37 Hrame butlers 34 24 pete wien ated tees Pus Owes eS 37 Functional programming example 14 Further reading navcsrsase bg Xue iu 18 G Gamit sss ed dese slaw eed oda mediis 5T Graphics in SENSAWAVE 2 10 Graphs 92efeekeLvehiwedueewereciedperp pev ent 42 H Host dependencies 00ceeeeeeeeeee 4 I Infix programming style 000005 2 Installations 4s2 242iceibobercecvdoue barr hete 3 Installation on Lin x 2 212 2mm 3 Installation on MAC OS X 3 Installation on OpenBSD sssse 3 Installation on Windows sllsluss 3 niroducbion emere ne ER Rs 1 Lambda as issa au miai enaa ho CR tun s 50 LAPACK examples 0002 eee eee 24 LAPACK numeri
16. f32matrix gt listlist make f32matrix BLAS_sgemm define blas multiplyf64 A B blas multiply A B listlist gt f64matrix f64matrix gt listlist make f64matrix BLAS_dgemm define blas multiplyc32 A B blas multiply A B listlist gt c32matrix c32matrix gt listlist make c32matrix BLAS_cgemm define blas multiplyc64 A B blas multiply A B listlist gt c64matrix c64matrix gt listlist Chapter 5 Scientific Repository make c64matrix BLAS_zgemm gt load examples sci blas2 scm gt blas multiplyf32 1 2 3 2904 5 6 7 8 2 9 58 64 139 154 gt blas multipiyc32 1 2 3 4 5 6 T 8 9 58 0 i 64 40 i 139 40 i 154 40 i gt blas multiplyf64 1 2 3 4 5 6 T 8 9 58 64 139 154 gt blas multiplyco4 1 2 3 4 5 6 7 8 9 58 0 i 64 40 i 139 40 i 154 40 i 5 2 LAPACK examples 10 11 10 11 10 C11 10 C11 24 12 12 12 12 The Linear Algebra PACKage LAPACK is a software library providing routines for solving systems of simultaneous linear equations least squares solutions of linear systems of equa tions eigenvalue problems Householder transformation to implement QR decomposition on a matrix and singular value problems The following code demonstrates access to the precompiled LAPACK library distributed with SENSAWAVE examples sci lapack scm simple LA
17. faster to write program files that SENSAWAVE can execute Two different types of program files are supported scm files are in the same functional style that we have worked with in this chapter and six are in a C Java style 3 8 1 Example Fourier approximation to a square wave A program to plot a Fourier approximation to a square wave might look like this in functional style examples nthharmonic scm program to plot fourier series to n th harmonic element wise addition of two lists define list 11 12 let loop L1 11 L2 12 r ODD if length L1 0 r loop cdr L1 cdr L2 append r list car L1 car L2 define nthharmonic n let wO 2 M_PI t 25 1 25 2000 v let loop i 3 factor 1 res map lambda x cos wO x t if in map lambda x 4 x M_PI res loop i 2 factor 1 list res map lambda x factor cos i wO x 1 i t ezgraph t v The program contains two functions the first of which is a simple helper routine that adds the elements of two lists element by element The second function calculates the nth harmonic and opens a graph of the result gt load examples nthharmonic scm Chapter 3 Quick Tour 15 gt nthharmonic 11 1 298314 0 778566 4 0 258818 4 0 260931 4 0 780679 4 1 300427 f T T T T 0 25 0 05 0 35 T 1 0 65 0 95 1 25 The following accomplishes the exact s
18. framebuffer image 2D graph Close The launchpad contains a number of buttons that will launch additional windows and is itself a small demonstration of the SENSAWAVE OpenGL interface This graphical interface provides a simple way to create powerful interactive programs Each window is running in an independent thread using the very efficient multi threading capabilities of the system Let s click on the top left button labeled linear graph This will launch an example of a linear graph built with the device independent graphing subsystem in SENSAWAV E KA OpenGL window Ale Es Example linear graph 14 4 0 9 0 7 0 5 0 3 Sinc function 0 1 0 1 4 0 3 0 X coordinate SENSAWAVE graphs can be rendered to a multitude of devices including PDF EPS PNG PPM framebuffers or direct OpenGL the above and will appear identical on all output devices This provides a powerful framework for developing multi purpose scientific visualizations Chapter 3 Quick Tour 11 Clicking on the semi log graph button of the launchpad opens another window this time containing an example of a semi logarithmic graph KA OpenGL Window Example semi log graph 1 0 0 8 Real C o o z amp 06 a e eo E 0 4 Imag ral 0 2 0 0 100 0 1000 0 10000 0 Frequency Hz This graph uses labels to identify the two curves Another illustration of the graphing subsystem opens wh
19. in each dimension 5 6 10 STARPAC STARPAC is library of routines for statistical data analysis from the National Institute for Standards and Technology NIST STARPAC is an acronym for Standards Time Series and Regression Package and contains computational routines for normal random number generation univariate sampling one way analysis of variance correlation analysis linear least squares nonlinear least squares digital filtering complex demodulation correlation and spectrum analysis and time series analysis 5 6 11 TOEPLITZ and STOEPLITZ TOEPLITZ double precision and STOEPLITZ single precision are libraries of routines for linear systems of Toeplitz or circulant form and for orthogonal factorization of column circulant matrices Chapter 5 Scientific Repository 33 5 7 Further reading Many of the libraries are best documented in the Fortran source code For this reason the subdirectory repository of the SENSAWAVE directory contains full source code for the entire SENSAWAVE scientific repository Chapter 6 Fonts and Colors 34 6 Fonts and Colors 6 1 Fonts SENSAWAVE provides a font system designed to generate identical output on all supported raster and vector rendering backends including PDF EPS PNG PPM and OpenGL The supported font faces are FONT MONOSPACE FONT_SANSSERIF FONT SERIF and FONT_ SYMBOL Each font except the latter is available in four different styles FONT NORMAL FONT BOLD FONT ITA
20. module disclaimer SensaWave offers no support on these third party modules Chapter 12 Copyright Information 57 12 Copyright Information This chapter provides third party copyrights and attributions related to the SENSAWAVE distribution The copyright and terms for SENSAWAVE itself is provided in the Chapter 13 license page 63 chapter 12 1 Gambit C The SENSAWAVE Computing Base relies on the powerful Gambit C Scheme compiler copyright 1994 2008 by Marc Feeley SENSAWAVE uses an unmodified version of the compiler under the Apache version 2 0 license The compiler is in the file bin gsc and the accompanying license in the file b in gsc license 12 2 MinGW The Windows version of the SENSAWAVE distribution includes MinGW compiler suite to facilitate compilation of the C code generated by Gambit C to native Windows binaries The MinGW compiler suite is located in the mingw directory and is distributed under the GNU General Public License see mingw COPYING for details 12 3 PDF library SENSAWAVE includes the PDF library written by Takeshi Kanno Copyright C 1999 2006 Takeshi Kanno This software is provided as is without any express or implied warranty In no event will the authors be held liable for any damages arising from the use of this software Permission is granted to anyone to use this software for any purpose including commercial applications and to alter it and redistribute it freely subject to t
21. must be copied into it in order to activate the program 2 1 1 Installing on Windows To install on Windows open the CDROM and double click on the executable Windows installer The installer will by default create a directory on the desktop containing the SENSAWAVE files Once the installer is finished drag a copy of license bin from the CDROM into the new directory 2 1 2 Installing on MAC OS X To install on MAC OS X simply double click on the macosx disk to mount it Inside the image is a directory containing the SENSAWAVE files Copy this to a location of your choice Drop a copy of license bin from the CDROM into the new directory 2 1 3 Installing on Linux To install on Linux extract the SENSAWAVE tar archive with the following command tar zxf sensawave 1 0 linux tar gz in the location where you want the SENSAWAVE directory to appear Drop a copy of license bin from the CDROM into the new directory Chapter 2 Installation 4 2 1 4 Installing on OpenBSD To install on OpenBSD extract the SENSAWAVE tar archive with the following command tar zxf sensawave 1 0 2 openbsd tar gz in the location where you want the SENSAWAVE directory to appear Drop a copy of license bin from the CDROM into the new directory 2 2 Installing from the Internet The files described in Section 2 1 cdrom page 3 can also be downloaded from the Sen saWave website http sensawave com The exception is your license key which can only be fo
22. of data and for checking the consistency of the Jacobian matrix with the functions 5 6 7 ODEPACK and SODEPACK ODEPACK double precision and SODEPACK single precision are collections of solvers for the initial value problem for ordinary differential equation systems They provide nine solvers suitable for both stiff and non stiff systems Systems can be given in explicit or linearly implicit form 5 6 8 RANLIB RANLIB is a library of routines for random number generation The bottom level routines provide 32 virtual random number generators Using this base routines are provided that return Beta random deviates Chi square random deviates exponential random deviates F random deviates Gamma random deviates Multivariate normal random deviates mean and covariance matrix specified noncentral chi square random deviates noncentral F ran dom deviates univariate normal random deviates random permutations of an integer array real uniform random deviates between specified limits binomial random deviates negative Binomial random deviates multinomial random deviates Poisson random deviates and integer uniform deviates between specified limits 5 6 9 REGRIDPACK REGRIDPACK is a library of routines for interpolating values between one two three and four dimensional arrays defined on uniform or nonuniform orthogonal grids an oper ation commonly referred to as regridding Linear or cubic interpolation can be selected independently
23. rgb xff x00 x00 4278190335 gt color rgbf 1 0 0 0 0 0 4278190335 SENSAWAVE also supports color gradients which is often useful for data visualization gt color gradient GRADIENT_GRAY 0 4278190080 gt color gradient GRADIENT_GRAY 1 4294967295 The supported gradients are GRADIENT_GRAY GRADIENT_RAINBOW GRADIENT_THERMAL and GRADIENT_COPPER Chapter 7 Framebuffers 37 7 Framebuffers A SENSAWAV E framebuffer is a device independent raster device that can be used to create graphical images 7 1 Framebuffer fundamentals We willcreate a framebuffer with a 300x300 pixel array using the command gt define fb framebuffer new 300 300 fb is now pointing to a new framebuffer The framebuffer is organized with the point 0 0 corresponding to the lower left corner and 300 300 corresponding to the upper right corner as shown here We can do operations on the framebuffer For example gt framebuffer clear fb Black gt framebuffer solidbox fb 50 50 250 250 Blue gt framebuffer text fb 105 150 White font new HELLO WORLD HORIZONTAL This clears the framebuffer to black draws a solid blue rectangle and finally writes a message in white color The resulting image can now for example be written to a PNG image file with the command gt framebuffer savePNG fb helloworld png We can also display the framebuffer on screen gt framebuffer gt glwindow fb Chapter 7 Framebuffers 38 The resulti
24. vector and matrix operations SENSAWAVE provides a loadable precompiled BLAS library Chapter 3 Quick Tour 9 gt module require BLAS gt BLAS_cdotu 5 C 1 B 1 103 0247802734375 5 i We can confirm this result by hand gt x 1 5 C 7 8 2 M PI 3 12 4 5 1 0i 5 103 02477796076938 5 i There is a slight discrepancy between the two results This is due to the difference in precision SENSAWAVE uses double precision numbers while cdotu is a single precision BLAS function Let us repeat the calculation using the double precision BLAS equivalent zdotu gt define C c64vector 5 7 8 M PI 12 5 1 0i gt define B list gt c64vector 1 5 5 gt BLAS_zdotu 5 C 1 B 1 103 02477796076938 5 i This result is now identical to the internal SENSAWAVE calculation as expected The SENSAWAVE Computing Base also supports simple homogenous matrix structures internally as a simple extension of the corresponding vectors A matrix is often conveniently built from a list of lists For example here is a 3x3 double precision matrix M and a 1x3 matrix X gt define M listlist gt f64matrix 3 1 3 1 5 9 2 6 5 gt define A listlist gt f64matrix 1 3 3 The quotes in the above command instruct SENSAWAVE to treat the quoted lists and data instead of attempting to evaluate them as expressions Let us now use these to solve the equation M X A using the double precisi
25. x define function2 xp let xv ptr gt f64vector xp 1 x f64vector ref xv 0 Clog x 1 100 x x numerical integration from 0 to infinity let result f64vector 0 this will hold our result limit 1000 lenw 4 limit iwork make s32vector limit work make f64vector lenw QUADPACK dqagi cons function2 1 O 1 O 0 001 result 0 O O limit lenw O iwork work for each display list Wn format QUADPACK dqagi 10F n f64vector ref result 0 Expecting 0 3616892 n We n 9 Chapter 5 Scientific Repository 30 Loading this code results in gt load examples sci quadpack QUADPACK dqag 0 06278740 Expecting 0 06278740 QUADPACK dqagi 0 3616892 Expecting 0 3616892 5 5 NSWCLIB examples The Naval Surface Warfare Center mathematical library NSWCLIB is an extensive library of high quality mathematical subroutines The example below calls functions for finding a function zero in this library It provides another demonstration of the callback mechanism that allows a precompiled library module to use interpreted SENSAWAVE functions examples sci nswc scm simple NSWCLIB example module require NSWCLIB Single precision function callback define sfunction xp let xv ptr f32vector xp 1 x f32vector ref xv 0 x 0 5 double precision function callback define dfunction xp let xv ptr f64vector xp 1 x f64vector ref x
26. 1 1 1 1 1 1 1 1 1 Black plot3d line p3 1 1 1 1 1 1 1 1 1 1 1 1 Black now draw the function let du 0 04 dv 0 04 let loop u 0 v 0 if lt u M PI let r1 func u v xi ri sin u cos v y1 r1 sin u sin v zi r1 cos u r2 func u du v x2 r2 sin u du cos v y2 r2 sin u du sin v z2 r2 cos u du r3 func u du v dv x3 r3 sin u du cos v dv y3 r3 sin u du sin v dv z3 r3 cos u du Chapter 7 Framebuffers 41 r4 func u v dv x4 r4 sin u cos v dv y4 r4 sin u sin v dv z4 r4 cos u c1 color gradient GRADIENT_THERMAL r1 0 9 5 0 c2 color gradient GRADIENT_THERMAL r2 0 9 6 0 c3 color gradient GRADIENT THERMAL x r3 0 9 5 0 c4 color gradient GRADIENT_THERMAL r4 0 9 5 0 newv if gt v 2 0 M_PI 0 v dv newu if newv 0 u du u plot3d shadedinterpquad p3 x1 y1 z1 c1 x2 y2 z2 c2 x3 y3 z3 c3 x4 y4 z4 c4 loop newu newv open the the graph in a window plot3d gt glwindow p3 t This program opens a window with the framebuffer graphics gt load examples plot3d scm Chapter 8 Graphs 42 8 Graphs SENSAWAVE contains a system for creating high quality scientific graphics It supports multiple output formats including Encapsulated postscript EPS and
27. 20005 21 SEISPACR od e hence eee Coe bere dee qus 31 Semi log graph example 10 44 Serial port communication 55 SCO o oio eb eee ELE Deb DPI ERE nee ya T setup ini configuration file 20 Simple graphung iioi Reb ister LESE 8 Sin c e beta eps da pP NR E ERU RR T 8 50 SLATEC examples 00022 eee 27 SEATEGC Cbrt 2 2 cred REI RP aliases 27 SLATEC CCDT ronnie adr EO aD aa Aan 27 SLATEC d6brt sionas papie Re RE eaa 27 68 SODEPAQGK eet ed dane onea agan 32 SOPE ni drra pep edit ath a dete and aoe Bua REED obs T SSaX SXIDL i as os poe etx RE p RR RODA pes 56 STARPAO eiie uRrhereresresies ense EE 32 Starting SENSAWAVE 0 000 6 SLOBEPLDILIZ e4iexk oie pLeCER Reed 32 String append 24 sne oiae i aani gad 7 string o e peda bedded ad oe beta sae hee 7 T JTOBPLLULZ wise sccid aor ae URP ERU LESE ne 92 U Uninstalling the software 0 4 V Variables ekeR hers ed REV DEBEO b qd rend nr 7 NBCUOEB ca oi debet oe I ihe tte tee b Rude 8 Visualization ccetbsi e ERRORS PS i Writing SENSAWAVE programs 14 X XME data parsig ree e mane RR mr 56
28. 3552 0 i 1 0 i gt lapack_solvec64 S 1 3 01 5 9 2 6 5 C 91 2 3 2 053 209 1 0 i 1 0000000000000002 0 i 1 0 i 5 3 SLATEC examples SLATEC is a comprehensive scientific software library containing over 1400 general purpose mathematical and statistical routines This is a simple example of accessing this library from within SENSAWAVE examples sci slatec scm simple SLATEC examples module require SLATEC cube root single precision display format nSLATEC_cbrt F n SLATEC_cbrt 10 display format Expecting F n n expt 10 1 3 cube root double precision display format SLATEC dcbrt FNn SLATEC dcbrt 10 display format Expecting F n n expt 10 1 3 cube root complex single precision display format SLATEC ccbrt F n real part SLATEC ccbrt 10 2 display format Expecting F n n expt 10 1 3 Chapter 5 Scientific Repository 28 bessel function of first kind double precision define J n x let Y f64vector 0 SLATEC dbesj x n 1 Y 0 f64vector ref Y 0 plot the bessel functions of order 0 1 2 3 define x O 10 100 define y1 map lambda x make rectangular J 0 x J 1 x9 12 define y2 map lambda x make rectangular J 2 x J 3 x x ezgraph x y x y2 Loading this code results in gt load examples sci slatec scm SLATEC_cbrt 2 1544346809
29. 387207 Expecting 2 154434690031884 SLATEC_dcbrt 2 154434690031884 Expecting 2 154434690031884 SLATEC_ccbrt 2 1544346809387207 Expecting 2 154434690031884 Note that the precision of the single precision cube root results are slightly different than the reference SENSAWAVE calculation due to the limited resolution The code also draws the bessel function of the first kind of orders 0 1 2 and 3 1 070138 0 761532 4 0 452927 4 0 144322 4 0 164283 0 472888 Chapter 5 Scientific Repository 29 5 4 QUADPACK examples QUADPACK is a standard library for the numerical computation of definite one dimensional integrals The following code demonstrates using QUADPACK with the SENSAWAVE function call back mechanism examples sci quadpack scm Simple demonstration of QUADPACK calls module require QUADPACK our function callback cos 100 sin x define function xp let xv ptr f64vector xp 1 x f64vector ref xv 0 cos 100 sin x numerical integration from O to Pi let result f64vector 0 this will hold our result limit 1000 lenw 4 limit iwork make s32vector limit work make f64vector lenw QUADPACK dqag cons function 1 0 M PI 0 0 001 6 result O O O limit lenw O iwork work for each display list Wn format QUADPACK dqag 10F n f64vector ref result 0 Expecting 0 06278740 n our function to integrate log x 1 100 x
30. 5 100 define y2 map lambda x car result x cadr result x2 draw the result ezgraph x y x2 y2 And here is the same example in C Java style examples linear regression six simple linear regression example Chapter 3 Quick Tour 17 test data with random noise obj x 5 5 20 obj y map obj C obj x f return 0 8 x 4 2 random_real 1 x perform linear regression obj result linear regression x y display format Linear regression y 4F x 4FNn car result cadr result fitted data obj x2 NC 5 5 100 obj y2 map obj obj x 1 return car result x cadr result x2 draw the result ezgraph x y x2 y2 The programs generate the same output gt load examples linear regression six Linear regression y 0 81 x 3 9 0 284634 1 451960 3 188554 4 4 925148 6 661741 8 398335 3 9 Compiling SENSAWAVE programs A unique feature of SENSAWAVE is the ability to compile programs like the one shown in the previous section In this section we will use this capability on a small benchmark program examples fib scm Simple fibonacci benchmark Chapter 3 Quick Tour 18 define fib n if lt n 2 1 fib n 1 Gib n 2 define n 30 display format Running fib D n n define start time time gt seconds current time fib n define end time time gt second
31. 93 SensaWave SENSAWAVE Manual Version 1 0 2 Copyright 2008 SensaWave Technology Inc SENSAWAVE SENSAWAVE Computing Base and the SensaWave logo are trademarks of SensaWave Technology Inc All other product or service names are the property of their respective owners Table of Contents 1 Ju trOdUCcllOnmn s 2 2 562645048 e465 5050680035 1 Welcome to the SENSAWAVE Computing Base 1 1 2 SENSAWAVE features and benefits 00 000 0200s 1 1 2 1 Fast execution speed sssueeesssseeees eee 1 1 2 2 Scientific repository lsssseslesseeeesee ees 1 1 2 8 Advanced visualization 0 000 cece eee eee eee ee 1 1 2 4 Cross platform development 0 0 00 eee eens 2 1 2 5 Choice of programming language see esses 2 2 InstelldtiofLes sod yo xo Rari C ce ea 3 2 1 Installation from CDROM sssesssee ere 3 2 1 1 Installing on Windows esses 9 2 1 2 Installing on MAC OS X 0 eee eee 3 2 1 3 Installing on Linx unius lade eae elles 3 2 1 4 Installing on OpenBSD uueesssseee else eee 4 2 2 Installing from the Internet 0 0 00 c eee eee eee 4 2 3 Changing the system PATH environment 4 4 2 4 Host system dependencies 0 0 cece cece eee eee ee eee 4 2 5 Uninstalling SENSAWAVE 000 0 cece eee eee eens 5 2 6 Further Questions 0000 cece eect eee teenies 5 3 Quick To
32. B examples 0 00 cece eee n 30 5 6 Other packages in the repository lesse esses esses 31 5 6 1 ARPACK esee rhe RERE oa goat e e cnc 31 5 6 2 CDEDIB 4 eePURPCRSOHREq deeds RE aud EFE 31 5 6 8 FFTPACK and DFFTPACK 000055 31 5 6 4 EISPACK and SEISPACK esses 31 5 6 5 LINPAGCK certet ete diene aU Nee Ra 31 5 0 6 IMINPACK recare oeron rte o GO CURRERE ed E 31 5 6 7 ODEPACK and SODEPACK essere 32 56 8 RANU Beia uiia tace oe Spa i Yn e aie 32 5 6 9 REGRIDPACK 0 000 eni EREE ERRED 32 50 10 STARPAC i ccn eas ioo 3 eee ck i AR nets 32 5 6 11 TOEPLITZ and STOEPLITZ 32 5 7 Further reading osese drosreririam ide kaa dnik iai aoii in 32 6 Fonts and Colors sacr nr emo OR 34 Ol don RTT p 34 02 COlOESus sexa n Is dcin Std e aera d eran dE gauche alee see EA ee 35 T d rameb lleEs 2522 vow eee em aC bees 37 7 1 Framebuffer fundamentals 0 0000 cece eee eee eee ee 37 7 2 Example 2D Plotting Primitives 0000 38 7 3 Example 3D plotting primitives 00 00 00 eee 39 B GIDUDDISu ss xad qo oie sewer sees eae ee ut 42 8 1 Example 1 Linear graph useessese esses 42 8 2 Example 2 Semi logarithmic graph 0005 44 8 9 Example 3 Double logarithmic graph 46 8 4 Example 4 2D image graph iiseesseeeelseee lesse 48 8 5 Quick data vi
33. E 14 ODEPACRK pecetea nena a selva dete anys 32 OpenGhiies ateena m e te a 1 LOY 12 952 Output devies isse rte cans o aee pcos ale 10 P iJ dil 4 PATH environment 0000e eee eeee 4 path expand so cesin cesses ee avert pre 13 PNG image rendering 13 pag oglwindow 22 de 0b rna ese eb meer as 13 Prefix programming style 005 2 PLECE getiren cedar te pedet t EUREN deseri ee rg 56 Prolog style logic programming 56 Q QUADPACK examples 0222000005 29 QUADPACK_dqag cee cece nn 29 QUADPACK dqagi iii eis cece ad nae on 29 Quick data visualization 004 50 R random r al 2 hp Beas ee wh eddie eae eles 50 Index RANDIB errn cece ainia n D EOE EEDA ia an 32 Rapid prototyping sc essesi ieuecnreroisati al rational cesc 252 0 end NEKET EUEN ee dare gg 7 FationaliZe 55 29 5b 3e sey ho arem beg it Real time graphing 4 51 REGRIDPAQOK 5 2 mede rry ever 32 Regular expressions cer een 56 RS232 Interfacing 2n RR eR 55 r8232 ClOB8B b eseRSRERPR ERE RE REMO b 55 I8232 0p6nz i plebs DNE deines e dnd 55 rs232 readline soc bb gv ERR 55 rs232 writeline css ki pi i bp edes 55 rtgraph io risks eben pida bur es dard a aed 51 Running SENSAWAVE eeeeeeeeeees 6 S SChelOg i eene pb eee eae done RR EPI 56 Scientific repository seeele eere 1 8 Scientific Repository
34. EVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIA BILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSL BILITY OF SUCH DAMAGE 13 3 SENSAWAVE Site and Deployment License The SENSAWAVE Computing Base the Software is copyright C 2007 2008 Sen saWave Technology Inc The Software is protected by the copyright laws of Canada In Chapter 13 License Terms 65 downloading configuring or using the Software you are not obtaining title to the Software or any copyrights You may not sublicense rent lease convey distribute copy modify translate convert to another programming language decompile or disassemble the Soft ware for any purpose You may not redistribute the Software By installing the Software you are agreeing to this license and disclaimer Conditioned on your honoring the terms of this agreement SensaWave grants you a non exclusive non transferable license to use the present version of the Software including the accompanying documentation for your lawful non infringing use on multiple computers at a single physical site in accordance with this Agreement In addition SensaWave grants you a non exclusive non transferable license to use subsets of the present version of the Software and the Software license key for deploying applications developed with the Software includ ing commercial provided that the use of such
35. LIC FONT BOLDITALIC The supported font sizes are FONT 8PT FONT 10PT FONT 12PT FONT 14PT FONT 18PT and FONT 24PT A font new call is used to create a font object and font font name and font size can be used to query a font object gt define f font new FONT 14PT gt font f t gt font name f Helvetica gt font size f 14 The name returned by font name is the one used for rendering on PDF and EPS backends The font stringascent font stringdescent and font stringwidth can be used to cal culate string dimensions for a given font gt font stringascent f a 8 gt font stringdescent f p 3 gt font stringwidth f Hello World 75 Unlike normal scheme objects a font object must be explicitly deleted to free its storage gt font delete f The following example renders some of the supported fonts in a framebuffer examples fonts scm displays loadable fonts in a framebuffer window routine to render a font define show font fbuf face points y let label ABCDEFGabcdefg12345 4 fnt font new points face dy font stringascent fnt label font stringdescent fnt label framebuffer text fbuf 20 y Black fnt label HORIZONTAL font delete fnt y dy Chapter 6 Fonts and Colors 35 define f framebuffer new 375 385 framebuffer clear f White let faces list FONT MONOSPACE FONT SANSSERIF FONT SERIF FONT SYMBOL points list FONT 8PT FONT 10PT FON
36. NIVERSITY OF UTAH SPECIFICALLY DISCLAIM Chapter 12 Copyright Information 59 ANY WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS BASIS AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE SUPPORT UPDATES ENHANCEMENTS OR MODIFICATIONS 12 6 The Portable Network Graphics library SENSAWAVE includes the Portable Network Graphics library libpng version 1 2 6 September 12 2004 is Copyright c 2004 Glenn Randers Pehrson and is distributed according to the same disclaimer and license as libpng 1 2 5 with the following individual added to the list of Contributing Authors Cosmin Truta libpng versions 1 0 7 July 1 2000 through 1 2 5 October 3 2002 are Copyright c 2000 2002 Glenn Randers Pehrson and are distributed according to the same disclaimer and license as libpng 1 0 6 with the following individuals added to the list of Contributing Authors Simon Pierre Cadieux Eric S Raymond Gilles Vollant and with the following additions to the disclaimer There is no warranty against interference with your enjoyment of the library or against infringement There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs This library is provided with all faults and the entire risk of satisfactory quality performance accuracy and effort is
37. PACK demonstration module require LAPACK gaussian elimination double precision define M listlist gt f64matrix CQ Te 3 1 b 9 2 6 5 2202 define X listlist gt f64matrix 1 3 3 define P make s32vector f64matrix rows M 0 LAPACK dgesv f64matrix rows M f64matrix columns X M f64matrix rows M P X f64matrix rows X O display nLAPACK_dgesv pp f64matrix listlist X display Expecting 1 1 1 n n tridiagonal gaussian elimination double precision we solve the system s Www ERY Ai 1 2 100 x1 2 5 10 23 10 x 4 00 1 3 2 x3 2 re X 000 141 x4 1 define f64vector 1 2 1 1 define f64vector 1 1 1 2 0 i define d f64vector 2 2 3 3 1 u define x f64vector 1 2 3 2 1 Chapter 5 Scientific Repository 25 LAPACK dgtsv 5 1 1 du x 5 0 display LAPACK_dgtsv pp f64vector gt list x display Expected 6 5 12 0 15 5 19 5 20 5 n n auxiliary division double complex function define z LAPACK zladiv 10 040 1i 2 0 0 1i display format LAPACK zladiv F i F n real part z imag part z display format Expecting F i F n n real part 10 0 0 1i 2 0 0 1i imag part 10 0 0 1i 2 0 0 11 Loading this program gives gt load examples sci lapack LAPACK_dgesv 1 1 0000000000000002 1 Expecting 1 1 1
38. PDF PNG PPM as well as unscreen rendering either through framebuffers or direct OpenGL The purpose of the library is to facilitate generation of complex graphs directly from SENSAWAVE It is particular useful for producing many graphs of a similar format for a large number of data sets quickly and with minimum human interventions For this type of situation the standard approach of transferring data from the analysis program to spread sheet and then to menu driven commercial graphics packages is not practical The graphing system can generate output suited for both on screen display and final printing from the same graph definition This provides a mechanism for fast interactive develop ment of publication quality material and also allows graphs to be build into interactive applications We will demonstrate the graphing system through four examples a linear plot semi logarithmic plot double logarithmic plot and a 2D image map The source code for these examples are included with the SENSAWAVE distribution 8 1 Example 1 Linear graph The following is an example of a linear graph examples graph linear scm example of a linear graph create the graph define g graph new 550 320 select the font graph font g font new Set the origin graph aorigin g 1 2 0 9 Set the style of the log axis graph linearstyle g 4 0 5 1 5 initialize the x axis 6 inches wide from 6 to 6 offset O inch tick e
39. POSIX character classes selective case and space insensitivity backreferences alternation backtrack pruning positive and negative lookahead and lookbehind in addition to the more basic directives familiar to all regexp users 11 1 1 pregexp copyright statement Copyright c 1999 2005 Dorai Sitaram All rights reserved Permission to copy modify distribute and use this work or a modified copy of this work for any purpose is hereby granted provided that the copy includes this copyright notice and in the case of a modified copy also includes a notice of modification This work is provided as is with no warranty of any kind Web site http www ccs neu edu home dorai pregexp pregexp html 11 2 schelog The schelog module provides Prolog style logic programming It contains the full repertoire of Prolog features including meta logical and second order predicates 11 2 1 schelog copyright Copyright c 1993 2001 Dorai Sitaram All rights reserved Permission to distribute and use this work for any purpose is hereby granted provided this copyright notice is included in the copy This work is provided as is with no warranty of any kind Web site http www ccs neu edu home dorai schelog schelog html 11 3 ssax sxml The ssax sxml module is an extensive library to manipulate and parse XML data ssax sxml was written by Kirill Lisovsky and is in the public domain Web site http ssax sourceforge net 11 4 Third party
40. RPAC STOEPLITZ TOEPLITZ TRANSFINITE VFFTPACK VFNLIB Instead of imposing yet another limited higher level application programming interface to these functions SENSAWAVE aims at providing a very thin interface that follows the calling conventions of the original code and provides access to all functions in the repository including auxiliary routines The repository functions must be called with homogenous vector matrix arguments of the type that matches the function call 64 for double precision real 32 for single precision real etc Immediates can also be used and are then automatically converted to a vector of the correct homogenous type of length one Function callbacks must be provided as a pair of the function and its number of arguments and the callback must then extract the calling arguments from a list of pointers To avoid namespace contamination the function names are prefixed with the name of the library in capitals followed by an underscore The following sections provide a number of examples intended to illustrate the use of the repository interface 5 1 BLAS examples Basic Linear Algebra Subprograms BLAS is the de facto application programming in terface standard for performing basic linear algebra operations such as vector and matrix multiplication SENSAWAVE contains a precompiled BLAS library The following code demonstrates access to the BLAS matrix library examples sci blas scm Simple dem
41. T 12PT FONT 14PT FONT 18PT FONT 24PT let loop fs faces ps points y 20 if gt length fs 0 let newpoints if length ps 1 points cdr ps newfaces if length newpoints 6 cdr fs fs newy show font f car fs car ps y loop newfaces newpoints newy framebuffer gt glwindow f t Loading this example gt load examples fonts ABXAEOI aby xbegy 1234513 ABXAEODT aPydedyl 2345 ABKAEOT ay A dus ABXAEST opy5epyl2345Ht3 ABXAESTufydedy 12345143 ABXGE Io Pybepy12945 RI ABCDEFGabcdefg12345 ABCDEF Gabodetel234 WS ABCDEFGabcdefg12345 ABC DEFG abcdef ac 2345 8 ABCDEFGabcdefg e RAECDEFGib de trizas ABCDEFGabcdefg 2345 s ABCDEF Gabcdefg12345 ABCDEF Gabcdef 12345 u ABCDEF Gabcdefg2345H ABCDE F Gabcdefg 12345 ABCDE FGabcdetg 1254 592 LM Nc Ae Beal ABCDEFGabcdefg1234 ABCDEFGabcdefg12345 4 ABCDEFGabcdefg12345 ABCDEFGabcdefg12345 4 RBDDEPGsbcdefgi12345 gi 6 2 Colors Colors are represented as 32bit RGBA values in SENSAWAVE and a large number of colors are predefined following the color naming of the X11 graphics system color red Chapter 6 Fonts and Colors 36 color green color blue and color alpha can be used to extract the channels of a given color gt Red 4278190335 gt color red Red 255 gt color blue Red 0 color rgb color rgba color rgbf and color rgbaf can be used to build custom colors gt color
42. Wave Technology Inc specifically disclaim any warranty including but not limited to implied warranties of merchantability and fitness for a particular purpose Chapter 12 Copyright Information 62 12 9 Trademarks Linux is a registered trademark of Linus Torvalds Mac OS is a registered trademark of Apple Inc Windows is a registered trademark of Microsoft Corporation OpenBSD is a registered trademark of Theo DeRaadt OpenGL is a registered trademark of Silicon Graphics Inc UNIX is a registered trademark of The Open Group X Window System is a trademark of X Consortium Inc Chapter 13 License Terms 63 13 License Terms This chapter provides information about the SENSAWAVE licensing terms Usage and distribution of SENSAWAVE must be in compliance with the appropriate license In simple terms SENSAWAVE is covered by three different licenses full legal terms follow in the next sections Evaluation License Software downloaded from the SensaWave website is subject to the SENSAWAVE Evaluation License and may only be used for the sole purpose of evaluating the SENSAWAVE Computing Base functionality for a limited time Single User License SENSAWAVE distributions purchased under a Single User License can only be used on a single computer at a single physical site at any given time All supported platforms are covered by the license but only one platform can be used at any given time SENSAWAVE software keys purchased under a Si
43. ach system 1 2 5 Choice of programming language SENSAWAVE applications can be written in two different programming styles functional prefix or C Java infix Experienced users will find that the functional style is the most terse and effective but the C style alternative allows new users to start writing applications right away in a familiar syntax The two programming styles can be mixed freely Chapter 2 Installation 3 2 Installation This chapter describes the software installation process All files of the SENSAWAVE Computing Base resides in a single directory 2 1 Installation from CDROM When you purchased the Software you received a CDROM containing a licensed copy of the SENSAWAVE Computing Base The CDROM contains the following files sensawave 1 0 win32 exe Self extracting installer for Windows platforms sensawave 1 0 macosx dmg Disk image for MAC OS X universal installations sensawave 1 0 linux tar gz Linux ix86 installation archive sensawave 1 0 openbsd tar gz OpenBSD ix86 installation archive license bin The SENSAWAVE license key These files can be used to install SENSAWAVE Computing Base on the supported platforms The version on the CDROM is the most current at the time of purchase To install simply select the installation file that matches your host system and follow the instructions below to extract the distribution directory Once the installation directory has been created the license key
44. ame thing using the C Java programming style examples nthharmonic six program to plot fourier series to n th harmonic element by element addition of two lists obj add_lists obj 11 obj 12 obj 13 for int i 0 i lt length 11 i 13 append 13 list list_ref 11 i list_ref 12 i return 13 obj nthharmonic int n obj wO 2 M_PI obj t 25 1 25 200 obj v map obj obj x return cos wO x t obj factor 1 for int i 3 i n it 2 factor 1 v add_lists v map obj obj x return factor cos wO i x i t v map obj obj x return 4 x M_PI v ezgraph t v This program can be loaded in exactly the same way as the previous one Chapter 3 Quick Tour 16 gt load examples nthharmonic six gt nthharmonic 21 1 297251 4 0 780418 0 263586 0 253246 0 770079 1 286911 LT T T T 1T 1 1 1T T A1 0 25 0 05 0 35 0 65 0 95 1 25 3 8 2 Example linear regression This an example of linear regression in standard functional style examples linear regression scm Simple linear regression example test data with random noise define x 5 5 20 define y map lambda x 0 8 x 4 2 random real 0 5 x perform linear regression define result linear regression x y display format Linear regression y 4F x 4F n car result cadr result fitted data define x2 5
45. bf oe paced e g3ded epu iee3 rede a ei ex 36 GOlOIS 2 nloree eb eb eee PER LFAP EE 35 Command line completion suus 19 Command line history 00 19 Command result history 19 COMPIL SSP iid cota eaten ase eret Gone ads 18 Compiling SENSAWAVE programs T7 COMPIOK T i saints cage a a E a E a 7 Console debugging 0000 0 20 Console editing commands 19 Console interface ioo cescicrssrs s rpiotradruiss 6 Console on line help 0 000 eee 20 Copyright information 0 0 0 5T DO TP niee na iaia oi DR e a ae 51 Cross platform development 2 CSV data hiles is tincnt errepi oaro A ENS 13 D Data files irei easa thine E pe Urea 13 datafile load e eins p Re e eas 13 datafile save resa eh eoe ce ERR s 13 defin ix xp EPA RR EEEE DRE SRL 7 8 SMO is usa dud reda od RU E Re avi Ln a Round 10 DEPFTPBAGRK reet ERR RR ER br SERIE 31 display LP deti E REPRE LAS 6 Double log graph example 11 46 Downloading from the Internet 4 E BISPAGCK 4 2 ERA EE ORE ees RU RE 31 exaCct f lils ker nba CREE WR PR Yu Rer agrees T Execution speed sssctirsisecroriisatsosiepaii 1 OXP ise raa DELE a REEERE EDE eae bee Sede deme 51 ezgraph es on pak unene Pal duces Ue 8 50 F f64matrix listlist 3 do o ped aas 9 EPTPAGCK e 4er PIREX XO HR ERR RA al Index bc BU tee 0 019
46. cal library 04 9 LAPACK COSY 5 246 b CI vb e ee Betsey 25 LAPACK dgesy RR ens 9 24 25 LAPACK dgtsv 2er eR ep EEG 24 LAPACK 8Sg68V sewer orere nnui RR 25 LAPACK zg68V 2 ie Bier esac ae Hed oe oe IRSE 25 LAPACK zladiw 22m DR nat ane ace dare Gee Pe pus 24 License keym amure hie cnie ereer cH EUER 3 License terms oed dep Ue ERREUR ds 63 Linear graph example 10 42 Linear fegression 0 252 0824 rex Re ER dee ee 16 LINPACK uz neeRIRaEGeue E hrda RS 31 67 JY Sb ote ad doris Ue eee Sid Pede ue nest etit iyi ac l List data structures ics spec vig gals peed epee di T list c32vectOf cenai onean aea DE Res 8 Tist gt c64vector ci eis bea pira eS 9 Listlist gt 64matrix ic eeece enter n nm mes 9 load socr e uae qe prt bad dae 15 17 18 M M 2PIl 2n dzzcu goeiderae B R4 pu piuecsd ijs 50 MEPT st taws Mace tenet iar paie cene cea 9 nake s32Vector 2223 944 e e ae ates 9 TOAD ar decd wings s RR ERAERAGISRE CeUNES 1 8 50 Matrices TER 9 ih Cm 7 MinGW Em 57 MINPAGR S a Lebuci uite td alte cs ete ag 31 mnodule require e er ae ee 8 9 55 N nested repl cei ke ESI P Rotes 20 NSWCLIB examples seeeeeseese 30 NSWCLIB dzero i 22 2i Ren e ITI 30 NSWCLIB zeroin i i1322 0599 p aeree RSS aoe 30 nthharmond6 ener rep a3uesceet RPM 14 Numerical operations 00005 7 Numerical precisions iioii ame rerent iria 9 O obje t file ae inaen pE EE
47. ecompile or disassemble the Software for any purpose You may not redistribute the Software You may not use the Software for any other purpose except evaluation of its functionality You must remove the Software from your system after the expiry of the temporary evaluation period Conditioned on your honoring the terms of this agreement SensaWave grants you a tempo rary non exclusive non transferable license to use the Software including the accompanying Chapter 13 License Terms 64 documentation for your lawful non infringing evaluation on a single physical computer at a single physical site in accordance with this Agreement THIS SOFTWARE IS PROVIDED BY SENSAWAVE TECHNOLOGY INC AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIM ITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL SEN SAWAVE TECHNOLOGY INC BE LIABLE FOR ANY DIRECT INDIRECT INCIDEN TAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIA BILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSI BILITY OF SUCH DAMAGE 13 2 SENSAWAVE Single User License The SENSAWAVE Computing Base the Software
48. en clicking on the log log button of the launchpad This is a double logarithmic graph with data point markers 10 0 The axis label Graphs are highly customizable and can easily be combined to build larger graphical data presentations SENSAWAVE also contains a powerful framework for generating raster images using de vice independent framebuffers with full alpha channels Framebuffers support both two dimensional and three dimensional operations making it easy to create complex images Framebuffers can be combined with the graphing subsystem for example to provide two Chapter 3 Quick Tour 12 dimensional graphs The 2D graph launchpad button illustrates such a combination of framebuffer and graph SA OpenGL Window Example 2D sinc function n co Y coordinate e iT ths wc Uu e LT TX Iw LU oru 4 3 2 1 0 1 2 3 4 X coordinate An example of a pure framebuffer rendering opens when clicking the 3D plot lauchpad button FA OpenGL Window This is a spherical plot illustrating the use of color gradients and shading with 3D frame buffer drawing primitives In addition to the device independent graphing and framebuffer facilities SENSAWAVE also provides direct access to the OpenGL API making it simple to create OpenGL graphics Chapter 3 Quick Tour 13 The OpenGL polygon launchpad button opens a very simple direct OpenGL rendering of a shaded polygon Aopenc window E Lcx The last fra
49. endencies The only dependency that SENSAWAVE has on the host system is that the gcc compiler is needed when generating native binaries Windows does not have this dependency since the SENSAWAVE Windows distribution ships with its own gcc compiler suite for your convenience On Mac OS X the gcc compiler is found in X code developer suite that can be obtained for free from Apple Linux and OpenBSD distributions are likely to have the compiler installed by default If not it can be installed from a separate standard package Please note that gcc is only needed if you intend to compile SENSAWAVE programs to binaries Normal operation does not require the compiler to be present Chapter 2 Installation 5 2 5 Uninstalling SENSAWAVE Uninstalling simply involves deleting the SENSAWAVE directory from your computer 2 6 Further Questions In case of any problems or questions please contact SensaWave Technology Inc by email to support sensawave com or call us at 1 604 322 9029 pacific standard time Please have your order number at hand Chapter 3 Quick Tour 6 3 Quick Tour 3 1 What is SENSAWAVE SENSAWAVE is a rapid prototyping environment for scientific and engineering applications It is capable of performing a wide range of advanced scientific statistical and mathematical operations and contains extensive visualization capabilities SENSAWAVE provides a simple and thin interface to the underlying computa tion visualization librari
50. er 1 Introduction 1 1 Introduction Welcome to the SENSAWAVE Computing Base Thank you for your interest in the SENSAWAVE Computing Base a powerful system for rapid prototyping of scientific and engineering applications to which this manual serves both as an informal introduction and in depth reference New users are encouraged to read Chapter 3 quicktour page 6 executing the examples in an interactive SENSAWAVE session to quickly gain an understanding of the SENSAWAVE fundamentals Experienced users can find detailed information about the language syntax in the remainder of the manual We invite you to contact us with any questions or comments related to this manual or the SENSAWAVE program Please visit our website for complete contact information http www sensawave com contact html We hope that the SENSAWAVE Computing Base will prove useful to you The SensaWave Team 2008 1 2 SENSAWAV E features and benefits The SENSAWAVE Computing Base is a powerful and flexible interactive programming environment tailored for scientific and technical computationally intensive applications SENSAWAVE bridges the gap between rapid prototyping and direct interfacing to high per formance scientific libraries Applications benefit both from an easy to use general purpose multi threaded language with sophisticated debugging facilities and a thin interface to an extensive repository of pre compiled scientific libraries 1 2 1 Fast execution s
51. es getting in the developers way as little as possible For example rather than providing a restrictive higher level interface to the underlying scientific libraries SENSAWAVE gives access to all functions in the libraries including auxiliary and intermediate routines This makes SENSAWAVE a unique environment for building new applications with a high technology content Unlike most other technical computing environments SENSAWAVE is built on a full fledged multi threaded general purpose language and is capable of compiling code to native binaries through the use of an efficient C compiler This enables applications to achieve execution speeds rivaling C Compiled and interpreted code can be mixed freely and external C code can easily be integrated through an efficient foreign function interface 3 2 Running SENSAWAVE On systems that support command line interfaces SENSAWAVE can be started by typing sensawave at the command prompt Systems with graphical user interfaces can activate SENSAWAVE by clicking on the SENSAWAVE program icon Once SENSAWAVE is started you will see a message followed by an input prompt like this Cte ge ATL IA Au sa l4 Nic IAI AW dou SENSAWAVE Computing Base ver 1 0 2 Copyright C 2008 SensaWave Technology Inc All rights reserved See user manual for full copyright statement and terms of use home doe sensawave 1 0 2 win32 Single User License 1234567890 ACME Inc Use exit to terminate demo fo
52. he following restrictions 1 The origin of this software must not be misrepresented you must not claim that you wrote the original software If you use this software in a product an acknowledgment in the product documentation would be appreciated but is not required 2 Altered source versions must be plainly marked as such and must not be misrepresented as being the original software 3 This notice may not be removed or altered from any Source distribution 12 4 GLEW library SENSAWAVE includes portions of the GLFW library written by Camilla Berglund Copyright c 2002 2006 Camilla Berglund This software is provided as is without any express or Chapter 12 Copyright Information 58 implied warranty In no event will the authors be held liable for any damages arising from the use of this software Permission is granted to anyone to use this software for any purpose including commercial applications and to alter it and redistribute it freely subject to the following restrictions 1 The origin of this software must not be misrepresented you must not claim that you wrote the original software If you use this software in a product an acknowledgment in the product documentation would be appreciated but is not required 2 Altered source versions must be plainly marked as such and must not be misrepresented as being the original software 3 This notice may not be removed or altered from any source distributio
53. http sensawave com manuals scheme rbdrs pdf SENSAWAVE is built on top of the Gambit C portable Scheme to C compiler Gambit C extends standard Scheme with a large number of additional features For a complete de scription of extensions compiler architecture and optimization please refer to the Gambit C manual http sensawave com manuals gambit c pdf Chapter 4 Console Editing 19 4 Console Editing SENSAWAVE supports interactive development through a simple console interface Com mands can be entered at the console and executed one by one The console supports command line completion command history result history and parentheses balancing 4 1 Command line completion The console features command line or tab completion capable of automatically filling in partially typed symbols For example typing g1B followed by pressing the tab key will produce glBegin an OpenGL procedure Repeated tab key presses will cycle through all matches of the partially entered symbol Typing g1B and pressing the tab key twice will produce glBitmap another matching OpenGL procedure and so on 4 2 Command history The console keeps a history of previously typed commands The history is accessed with the arrow keys Pressing the up arrow will return the previous command and the history can be navigated by multiple presses of up and down arrow The history is maintained between sessions 4 3 Result history The console also keeps a short histo
54. lvers module require LAPACK generic wrapper for the gesv solvers obj _lapack_solve obj A obj B obj 11m obj mll obj gesv 1 if listlist qm A amp amp listlist qm B 4 int n length car A int n2 length A int n3 length B int bnrsh length car B if n n2 amp amp n n3 1 obj ma 1lm A obj mb 11m B obj mp make s32vector n 0 gesv n bnrsh ma n mp mb n 0 m11 mb else error illegal array dimensions else error arguments must be lists of lists j the specific solvers for all precisions obj lapack solvef32 obj A obj B 1 Chapter 5 Scientific Repository 27 _lapack_solve A B listlist_to_f32matrix f32matrix to listlist LAPACK_sgesv obj lapack_solvef64 obj A obj B 1 _lapack_solve A B listlist_to_f64matrix f64matrix to listlist LAPACK_dgesv obj lapack_solvec32 obj A obj B 1 _lapack_solve A B listlist_to_c32matrix c32matrix_to_listlist LAPACK_cgesv y obj lapack solvec64 obj A obj B 1 _lapack_solve A B listlist to c64matrix c64matrix to listlist LAPACK zgesv gt load examples sci lapack2 six gt lapack solvef32 3 1 3 Cl 5 9 2 6 5 9 C 10 3 8 22 1 9999999403953552 1 gt lapack_solvef64 3 1 3 0h 5 GS 6 5 1 3 3 1 1 0000000000000002 1 gt lapack_solvec32 3 1 3 1 5 9 2 6 5 C 1 GG G3 1 0 i 999999940395
55. mebuffer image button on the graphical demo launchpad illustrates loading of images from file This image is loaded from a PNG file into a framebuffer and rendered to the screen with a single command gt png gt glwindow path expand examples balloons png 3 7 Reading and writing data files Most technical computing applications require that numerical data be saved to and read from permanent media such as hard disks SENSAWAVE provides a simple mechanism for loading and saving data as comma separated values CSV Such files can also be handled by most spreadsheet programs such as Excel Let us save an example data set to file gt define data 1 2 3 4 5 6 7 8 9 gt datafile save example csv data The resulting file contains three lines of comma separated values We can reload the data like this Chapter 3 Quick Tour 14 gt datafile load example csv 1 2 3 45 6 7 8 9 If the data is not going to be used for import into other programs it can be more efficient to save it in native format For example gt object gt file data example dat gt file gt object example dat 12 3 45 6 7 8 9 In addition to these simple interfaces SENSAWAVE also supports general purpose file I O that can be used to generate and or parse more complicated data file formats 3 8 Writing SENSAWAVE programs So far we have been typing commands at the SENSAWAVE prompt For real applications it is much
56. n 12 5 GIFPlot library SENSAWAVE includes portions of the GIFPlot library licensed as follows Dave Beazley Department of Computer Science Theoretical Division T 11 University of Utah Los Alamos National Laboratory Salt Lake City Utah 84112 Los Alamos New Mexico 87545 beazley cs utah edu beazley lanl gov Copyright c 1996 The Regents of the University of California and the University of Utah All Rights Reserved Permission is hereby granted without written agreement and without license or royalty fees to use copy modify and distribute this software and its documentation for any purpose provided that 1 The above copyright notice and the following two paragraphs appear in all copies of the source code and 2 redistributions including binaries reproduces these notices in the supporting documentation Substantial modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here provided that the new terms are clearly indicated in all files where they apply IN NO EVENT SHALL THE AUTHOR THE UNIVERSITY OF CALIFORNIA THE UNIVERSITY OF UTAH OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE THE AUTHOR THE UNIVERSITY OF CALIFORNIA AND THE U
57. nal software If you use this software in a product an acknowledgment in the product documentation would be appreciated but is not required 2 Altered source versions must be plainly marked as such and must not be misrepresented as being the original software 3 This notice may not be removed or altered from any source distribution 12 8 Scientific repository packages The SENSAWAVE distribution includes a large number of pre compiled numerical libraries that make up the scientific repository These libraries are available in the public domain or similar unrestrictive licenses in source code form at various sites on the Internet The libraries are not part of the SENSAWAVE Computing Base proper and are merely provided in binary form as a convinience to SENSAWAVE users Attribution related to the individual libraries can be found in the original source code which is located in the repository directory SensaWave makes no representation whatsoever in regards to these libraries All of the libraries are provided on an as is basis and SensaWave Technology Inc have no obligation to provide maintenance support updates enhancements or modifications In no event shall SensaWave Technology Inc its owners contributors or distributors be liable to any party for direct indirect special incidental or consequential damages arising out of the use of the libraries and their documentation even if advised of the posibility of such damage Sensa
58. nce Library even if advised of the possibility of such damage Permission is hereby granted to use copy modify and distribute this source code or portions hereof for any purpose without fee subject to the following restrictions 1 The origin of this source code must not be misrepresented 2 Altered versions must be plainly marked as such and must not be misrepresented as being the original source 3 This Copyright notice may not be removed or altered from any source or altered source distribution Chapter 12 Copyright Information 61 The Contributing Authors and Group 42 Inc specifically permit without fee and encourage the use of this source code as a component to supporting the PNG file format in commercial products If you use this source code ina product acknowledgment is not required but would be appreciated 12 7 The zlib compression library SENSAWAVE includes the zlib compression library Copyright C 1995 2003 Jean loup Gailly and Mark Adler This software is provided as is without any express or implied warranty In no event will the authors be held liable for any damages arising from the use of this software Permission is granted to anyone to use this software for any purpose including commercial applications and to alter it and redistribute it freely subject to the following restrictions 1 The origin of this software must not be misrepresented you must not claim that you wrote the origi
59. nctionname must be a symbol or a string 4 6 Console debugging and further reading The console provides a number of mechanisms to facilitate debugging of interpreted pro cedures including single stepping break points and tracing These capabilities are doc umented in the Gambit C manual which contains a complete description of the console interface http www sensawave com manuals gambit c pdf Some users will notice that the Gambit C facility for nested read eval print loops has been disabled by default in SENSAWAVE This functionality can be activated by placing the line nested repl true in the SENSAWAVE configuration file setup ini Chapter 5 Scientific Repository 21 5 Scientific Repository A large number of widely recognized high quality scientific software libraries were developed by scientists at universities and research centers in the past decades Many are available in repositories such as Netlib but often in a form that requires significant effort to use SEN SAWAVE makes a large number of these libraries directly accessible as loadable modules At the time of writing the SENSAWAVE repository totals 1 581 626 lines of code providing 8 301 distinct function calls in 33 libraries ALFPACK ARPACK BESPAK BLAS CDFLIB CMLIB COULOMB DATAPAC DFFTPACK DIFF EISPACK ELLIPGRID FFTPACK FNLIB LAPACK LINPACK MINPACK NSWCLIB ODEPACK QUADPACK RANLIB REGRIDPACK SEISPACK SLATEC SMINPACK SODEPACK SPECFUN STA
60. ng image looks like this HELLO WORLD The framebuffer framework supports a wide range of graphical operations listed in the refer ence section of this manual Most applications however benefit by accessing the framebuffer through the 2D or 3D abstractions that are described by example in the two following sections 7 2 Example 2D Plotting Primitives SENSAWAVE provides higher level functions for drawing 2D graphics primitives in a frame buffer These functions provide scaling to real world coordinates The following example draws a 2D function map using color interpolated rectangles examples plot2d scm Simple example of 2D framebuffer primitives function to render define func lambda x y let r sqrt x x y y sin 0 3 r x cos 0 3 r y 1 r draw the framebuffer image define f framebuffer new 400 400 framebuffer clear f White define p2 plot2d new f 6 3 6 3 6 3 6 3 plot2d setview p2 15 15 385 385 framebuffer noclip f framebuffer box f 14 14 385 385 Black plot2d start p2 plot2d clear p2 Black Chapter 7 Framebuffers 39 let dx 0 25 dy 0 25 let loop x 6 3 y 6 3 if lt x 6 3 let z1 func x y z2 func x dx y z3 func x dx y dy z4 func x y dy newy if gt y 6 3 6 3 y dy newx if newy 6 3 x dx x plot2d interpbox p2 x y x dx y dy color gradient GRADIENT_RAINBOW
61. ngle User License cannot be used to deploy applications Site and Deployment License SENSAWAVE distributions purchased under a Site and Deployment License can be used by any number of users on all supported platforms at a single physical site In addition SENSAWAV E software keys purchased under a Site and Deployment License can be redistributed with an application including commercial developed by the holder of the License as long as the end use of the application is not in direct competition with the SENSAWAV E distribution itself and the application does not offer any form of an interactive command interface Such deployments must only include the subset of SENSAWAVE actually used Please note that the SENSAWAVE Computing Base cannot be redistributed under any of the license terms set forth below If you do not agree to the terms of the license agreement that applies to you please do not install or use SENSAWAVE 13 1 SENSAWAV E Evaluation License The SENSAWAVE Computing Base the Software is copyright C 2007 2008 Sen saWave Technology Inc The Software is protected by the copyright laws of Canada By copying installing or using the Software you are agreeing to this license and disclaimer In downloading configuring or using the Software you are not obtaining title to the Software or any copyrights You may not sublicense rent lease convey distribute copy modify translate convert to another programming language d
62. on LAPACK func tion dgesv LAPACK the Linear Algebra PACKage is a library for numerical computing that provides routines for solving systems of simultaneous linear equations least squares solutions of linear systems of equations eigenvalue problems etc We can load it just like we did with BLAS gt module require LAPACK gt define P make s32vector 3 gt LAPACK_dgesv 3 1 M 3 P A 3 0 gt f64matrix gt listlist A 951 29 C12 1 2 P is a three element vector of signed 32bit integers that is needed for LAPACK to complete the calculation The value returned in A is the matrix X solving M X A as can readily be confirmed These simple examples illustrate how simple the interface to the fortran repository is All functions of the entire fortran repository can be accessed in this way giving the developer the ability to fine tune numerical calculations and even utilize auxiliary functions in the repository Chapter 3 Quick Tour 10 3 6 Graphics in SENSAWAVE The SENSAWAVE Computing Base provides a number of powerful visualization mecha nisms We will use the demo procedure to illustrate some of the capabilities of the system gt demo Please wait building demonstration data t A new window will now appear on the screen This is the graphical demonstration launch pad A OpenGL Window SENSAWAVE graphical demo launchpad linear graph 3D spherical plot semi log graph OpenGL polygon log log graph
63. oses the window WINDOW KEYPRESS WINDOW KEYRELEASE These events are generated by the keyboard The x parameter contains the ascii code of the relevant key Special values are WINDOW KEYENTER WINDOW KEYTAB WINDOW KEYBACKSPACE WINDOW KEYRIGHT WINDOW KEYLEFT WINDOW KEYUP WINDOW KEYDOWN and WINDOW KEYESCAPE Chapter 9 OpenGL 54 WINDOW_MOTION This event is generated when the mouse is moved inside the window The auxiliary parameters x and y contains the position of the mouse within the window WINDOW_REDRAW The event is generated when the window needs to be redrawn This is where the OpenGL rendering code must be called Prior to calling any OpenGL functions the event handler must first call glcontext grab to acquire the OpenGL rendering context and then assign it to the window with glcontext window After the rendering is complete the OpenGL rendering context must be released with a call to glcontext release This simple framework is sufficiently advanced to allow complex interactive multi window graphics to be created 9 1 Further reading For more information about OpenGL programming please refer to http opengl org Chapter 10 RS232 Interfacing 55 10 RS232 Interfacing The RS232 serial interface provides a simple cross platform framework for serial communi cation from within the SENSAWAVE Computing Base It is designed to enable communi cation with multiple devices concurrently and offers an easy way to inte
64. ostration of BLAS calls load the BLAS module module require BLAS scalar product single precision define X f32vector 1 2 3 define Y f32vector 7 T 7 define N f32vector length X Chapter 5 Scientific Repository 22 for each display list NnBLAS sdot BLAS sdot N X 1 Y 1 nExpecting 42 n n matrix multiply double precision define A listlist gt f64matrix 0 11 0 12 0 13 0 21 0 22 0 23 define B listlist gt f64matrix 1011 1019 01001 1022 1081 1032 define C make f64matrix 2 2 BLAS dgemm 78 78 f64matrix rows A f64matrix columns B f64matrix columns A 1 0 A f64matrix rows A B f64matrix columns A 0 0 C f64matrix rows A display BLAS dgemm pp f64matrix listlist C display Expecting 367 76 368 12 674 06 674 72 n n matrix vector multiply single precision complex define M listlist gt c32matrix 3 0 1 0 3 0 1 5 9 2 6 5 define X listlist gt c32matrix CC 1 01 51 03 1 0i define Y make c32matrix 3 1 BLAS_cgemv N c32matrix rows M c32matrix columns M 1 0 M c32matrix rows M X 1 0 0 Y 1 display BLAS_cgemv pp c32matrix gt listlist Y display Expecting 0 1 i 0 3 i 0 3 i n n matrix vector multiply single precision complex define M listlist gt c64matrix 03 0 1 0 3 0 1 5 9 2 24 6 5 292 define X listlist gt c64matrix 1
65. peed SENSAWAVE can compile applications to portable C language and native machine code is generated using an efficient C compiler on the host computer This enables very high execution speeds to be obtained Compiled and interpreted code can be mixed freely for maximum flexibility 1 2 2 Scientific repository SENSAWAVE provides a complete interface to a large repository of industry standard nu merical and scientific code including the ARPACK BLAS EISPACK FFTPACK LA PACK LINPACK and SLATEC packages A total of 33 such packages are provided giving technical computing developers unprecedented choice of implementation and full control behind the scenes 1 2 3 Advanced visualization SENSAWAVE provides a number of powerful systems optimized for creating high quality vi sualizations in scientific computing applications This includes a device independent graph ing system frame buffers operating on of 32 bit image data arrays as well as both 2D and 3D engines providing graphics primitives in real world coordinates Direct OpenGL Chapter 1 Introduction 2 rendering is also supported and input event callbacks allow complex interactive graphical applications to be developed 1 2 4 Cross platform development SENSAWAVE provides maximum freedom to developers by supporting a wide range of op erating systems and offering multi platform licenses Code runs unaltered on all supported platforms and can be compiled to native binaries on e
66. r graphical demonstration gt The SENSAWAVE input prompt accepts commands expressions debugging commands etc Each time you press enter the SENSAWAVE engine will process your command and print a result gt display hello world n hello world 3 3 Basic command line syntax SENSAWAVE is built on top of Gambit C a powerful implementation of the functional language Scheme By default the command prompt follows the Scheme prefix syntax Expressions are usually of the following format Chapter 3 Quick Tour proc argi arg2 This calls the function proc with the provided arguments For example gt min 3 15 2 4 1 gt string append A B C ABC gt gt 24 t gt string apples oranges f gt 123 Ce 12 3 36 Variables are bound using the define command and the bindings can be changed with set 3 4 gt define x 1 23 gt x 1 23 gt set x test gt x test gt define myfunction x x 10 gt myfunction 2 3 12 3 Numerical operations SENSAWAVE features a powerful numerical subsystem that supports complex rational and exact numbers gt complex 1 1 0i t gt sin 1 242 4i 0 1 6i 2 240067903791034 2 55583355854244281i gt 1 214 1 128 171 13696 gt rationalize M_PI 1e 6 355 113 gt rational 1 2 dt exact 1 dt exact 1 0 Hf The fundamental data structure in SENSAWAVE is the list
67. rface a wide range of devices such as scientific instruments and network devices The RS232 modules must be loaded manually gt module require rs232 Let us assume that a serial device is connected to port COM1 at 9600 8N1 9600 baud 8 bit characters no parity and 1 stop bit Communication with this device can be started with the command gt define port rs232 open COM1 RS232_9600BAUD RS232_8BITS RS232_NOPARITY RS232_ONESTOPBIT A message can now be sent to the device using the communication handle gt rs232 writeline port hello n and responses can be received gt rs232 readline port world Once communication is complete the interface is closed with the command rs232 close port Serial port names are platform dependent Please refer to your operating system documen tation for the naming scheme Attempting to open an unconnected serial interface may cause rs232 open to hang for some time This implementation assumes that the communication flow control is completely controlled by the external device Chapter 11 Additional functionality 56 11 Additional functionality The SENSAWAVE Computing Base includes several general purpose libraries provided in compiled form as a convenience for SENSAWAVE users 11 1 pregexp The pregexp module provides regular expressions modeled on perl and includes such power ful directives as numeric and nongreedy quantifiers capturing and non capturing clustering
68. ry of the last returned command results These are accessed by typing one or more hash signs A single hash sign expands to the last command result two hash signs the next to last and three the second to last 1 2 2 vov aov O V 16 4 4 Console editing commands Several editing commands are available at the console Here is a list of the most commonly used commands lt ctrl gt a Moves the cursor to the beginning of the line lt ctrl gt c Interrupts evaluation of a command lt ctrl gt d Generates an end of file lt ctrl gt e Moves the cursor to the end of the line lt ctrl gt k Deletes the text from the cursor to the end of the line and places it on the clipboard lt ctrl gt 1 Clears the console lt ctrl gt y Pastes any text that is on the clipboard Chapter 4 Console Editing 20 4 5 Console on line help The console offers a simple help mechanism through the function gt list ref list ref list k Returns the kth element of a list framebuffer interpbox framebuffer interpbox framebuffer x1 y1 x2 y2 colori color2 color3 color4 Draws a box but interpolates color values between values specified at the four corners This is commonly used to produce smoothing effects The color values are assigned as x1 y1 color1 x1 y2 color2 x2 y1 color3 and x2 y2 color4 gt functionname Displays help information regarding the named function if available fu
69. s current time display format fib D took 4F seconds to complete Wn n end time start time This program performs a recursive CPU intensive function call and performs a simple timing gt load examples fib Running fib 30 fib 30 took 2 97 seconds to complete examples fib scm We can see that it took almost three seconds to complete the call To improve this we now compile the program to binary form gt compile file examples fib scm t Note that this call requires that the host system has a gcc compiler installed see Section 2 4 host dependencies page 4 We can now repeat the call gt load examples fib Running fib 30 fib 30 took 0 12 seconds to complete examples fib o1 We notice a speed improvement of about twenty times due to the compilation this will vary depending on the host system Notice how the file loaded has the extension o1 This is the binary that was generated by the compiler 3 10 Further reading We recommend that you browse the examples in the examples subdirectory and use those as a starting point for exploring the capabilities of the software further It is beyond the scope if this manual to offer a complete general description of the Scheme programming language on which SENSAWAVE is built There are several texts available on the Internet doing so including The formal Scheme language definition can be found in Revised 5 Scheme Report
70. sualization iisiiillieie sees 50 9 OpenGE uade xr e arde RE ee Rd aa 52 9 1 Further reading ws 4 22 24 ed ene Res iO EUR 54 10 RS232 Interfacing 42 or Rr RR RES 55 11 Additional functionality 56 lll pregexp tis Sates ccc tek Bias bees indu ncn Rea y User ec Rec as 56 11 1 1 pregexp copyright statement 0 000 0000 56 11 2 schelog once eee ee oe ene tete d uiid es e reader s 56 11 2 1 schelog copyright 0 cece eee eee n 56 11 3 SSaX SkM ieee aap reg ee ea aed eed Shee ew eee ee 56 11 4 Third party module disclaimer 00 0000 00 56 12 Copyright Information 57 12 1 Gambit C isti Rpenee EE E E taeda eed 57 122 MinGW epean donde oa uiae ense donatus Ge eee eh 57 123 PDE Dray 2256s ee asya dea pto to EE A ba ae ATA 57 12 4 GLEW lbraryu iik erate dade RR ERE Ks 57 12 5 GIF Plotlibrary 4 22 0 od Poo Er A EET i Sides aad 58 12 6 The Portable Network Graphics library 59 12 7 The zlib compression library 0000 eren 61 12 8 Scientific repository packages 000 0 cece else eese 61 12 9 Vrademarks majat 2 tenta vanbadaeetenidaa c e eor odd 61 13 License Tearing 2 es scaceasiccvesds rre e v es 63 13 1 SENSAWAVE Evaluation License eesseee eese 63 13 2 SENSAWAVE Single User License 000 eee 64 13 3 SENSAWAVE Site and Deployment License 64 ii Chapt
71. t 222522299 Rr ERE EE Y R TE ERE 6 3 1 What is SENSAWAVE lssluullllees hh 6 3 2 Running SENSAWAVE ssuesssee ehh 6 3 3 Basic command line syntax ssseseeeeeeee eee eee 6 3 4 Numerical operations ssssseeesesee sehn Y 3 5 Vectors matrices and the Scientific Repository 8 3 6 Graphics in SENSAWAVE 0 000 cece eee eens 10 3 7 Reading and writing data files 0 000 cece eee 13 3 8 Writing SENSAWAVE programs 000e eee ee eee 14 3 8 1 Example Fourier approximation to a square wave 14 3 8 2 Example linear regression llis else esses 16 3 9 Compiling SENSAWAVE programs lesse essere 17 3 10 Further reading 0 cece eee eee teen tenes 18 4 Console Editing Vae soe rrr awe wea ee ees 19 4 1 Command line completion 000 00 c eee eee eee 19 4 2 Command history 0 0 cece eee eee hh 19 4 9 Result history i xis ceci ede dented eerie Rr ceed ede 19 4 4 Console editing commands ssssssseeeeee esses 19 4 5 Console on line help 0 0 cece eee eee seh 20 4 6 Console debugging and further reading 00 05 20 5 Scientific Repository 22206 21 5 1 BLAS examples 0 0022 e eens 21 5 2 LAPACK examples 2 2 outer phen e RA Ee hd 24 5 9 SLATEG examples cese ce ete Re eae 27 5 4 QUADPACK examples 0 00 0 cece cece nnn 28 5 5 NSWCLI
72. und on the distribution CDROM This key must then be dropped into the distribution directory after the installation of the downloaded files Your license key will work with all maintenance releases of the major release for which it was purchased This allows you to benefit from the later revisions of that release 2 3 Changing the system PATH environment SENSAWAVE can be run from within its directory with no further actions However on systems with a command line interface in particular Linux and OpenBSD you will benefit from having the SENSAWAVE directory added to the PATH environment to allow the system to be started from anywhere on the host This can be accomplished like this in bash korn shell PATH PATH path to sensawave export PATH where path to sensawave is the fully qualified path of the SENSAWAVE directory The above command can be added to the appropriate startup files to make the change perma nent Please refer to your host system for the information about how to do that The above is not normally needed on Windows unless you plan to call the SENSAWAVE executable from the command prompt In that case you can do the following 1 Open the System Properties under the Control Panel 2 On the Advanced tab click on Environment Variables select the existing variable Path and click Edit 3 Add the SENSAWAVE directory to the path and click OK c your current path setting c path to sensawave 2 4 Host system dep
73. v 0 x 0 5 find a zero of the function define sresult NSWCLIB zeroin cons sfunction 1 0 1 1e 3 1e 3 define dresult NSWCLIB_dzero cons dfunction 1 0 1 1e 3 1e 3 for each display list n format NSWCLIB zeroin F n sresult format NSWCLIB_dzero F n dresult Expected 0 5 Ane in Loading this code results in Chapter 5 Scientific Repository 31 gt load examples sci nswclib NSWCLIB_zeroin 0 5 NSWCLIB_dzero 0 5 Expected 5 5 6 Other packages in the repository The following is a non exhaustive summary of the capabilities of some of the other libraries in the SENSAWAVE repository 5 6 1 ARPACK ARPACK is a library of routines for solving large scale eigenvalue problems designed to compute a few eigenvalues and corresponding eigenvectors of a general matrix It is based upon an algorithmic variant of the Arnoldi process called the Implicitly Restarted Arnoldi Method ARPACK is capable of solving large scale symmetric non symmetric and gener alized eigen problems 5 6 2 CDFLIB CDFLIB contains routines to compute cumulative distribution functions inverses and pa rameters of the distribution for the statistical distributions Beta Binomial Chi square Noncentral Chi square F Noncentral F Gamma Negative Binomial Normal Poisson and Student s t 5 6 3 FFTPACK and DFFTPACK FFTPACK single precision and DFFTPACK double precision are libraries for fast
74. very 1 label every 2 tick graph xlinear g 6 0 6 6 0 1 2 initialize the y axis 3 inches high from 0 3 to 1 1 offset O inch tick every 1 label every 2 tick graph ylinear g 3 0 0 3 1 1 0 0 0 1 2 draw a domain mesh Chapter 8 Graphs 43 graph color g Grey graph moveto g 6 0 0 graph lineto g 6 0 0 graph moveto g 0 0 3 graph lineto g 0 1 1 graph stroke g graph mesh g draw the sinc function curves graph color g Green graph moveto g 6 sinc 6 let loop x 6 if lt x 6 begin graph lineto g x sinc x loop x 0 1 graph stroke g graph color g Red graph moveto g 6 sinc 6 let loop x 6 if lt x 6 begin graph lineto g x sinc 1 5 x loop x 0 1 graph stroke g draw the x and y axis graph color g Black graph xaxis g graph yaxis g draw the axis labels graph ylabel g Sinc function graph xlabel g X coordinate draw a caption in physical coordinates graph setcoord g GRAPH PHYS graph htextcenter g 3 3 2 Example linear graph uncomment to output the graph as EPS PDF PNG PPM graph output g GRAPH EPS graph sinc eps graph output g GRAPH PDF graph sinc pdf graph output g GRAPH PNG graph sinc png graph output g GRAPH PPM graph sinc ppm Show the graph on screen graph output g GRAPH WIN This produces the following Chapter 8 Graphs 44 gt load
75. w the axis labels graph ylabel g Relative capacitance graph xlabel g Frequency Hz draw labels to identify real and imaginary curves graph color g Red graph htextleft g 1000 0 8 Real C graph color g Blue graph htextright g 400 0 3 Imag C draw a title graph color g Black graph htextcenter g 1000 1 05 Example logarithmic graph Show the graph on screen graph output g GRAPH WIN This produces the following graph Chapter 8 Graphs 46 gt load examples graph semilog Relative capacitance 0 6 0 4 0 2 0 0 Example logarithmic graph J Real C 4 Imag C re 100 0 1000 0 10000 0 Frequency Hz 8 3 Example 3 Double logarithmic graph examples graph loglog scm Example of a double logarithmic graph Adopted from an original Cgraph example the data to plot data 1 95 2 39 0 99 0 82 1 21 1 39 1 97 2 23 define 2 3 e 4 3 2 2 ER C 2 3 2 25 26 58 82 91 57 2 23 3 91 0 2 3 1 95 54 28 74 3 GL 2 1 2 3 65 4 17 2 84 2 85 2 42 2 79 1 34 0 78 67 2 49 3 59 2 84 2 65 2 85 1 56 2 55 33 2 07 1 02 1 63 1 93 1 04 1 32 2 75 2 1 68 1 78 1 91 1 4 1 55 2 37 1 89 91 2 6 1 32 1 25 3 65 3 12 4 19 3 71 35 1 99 4 02 3 96 4 32 5 13 1 27 0 9 5 2 59 4 21 4 81 3 12 3 12 4 17 4 69 2 6 2 67 56 2 create define g 08 11
76. xt window w assign the rendering window glClearColor 0 0 0 0 setup OpenGL glMatrixMode GL PROJECTION glLoadIdentity glOrtho 1 1 1 1 1 1 1 1 1 1 glMatrixMode GL MODELVIEW glLoadIdentity glClear GL COLOR BUFFER BIT glBegin GL QUADS render OpenGL glColor Red glVertex3f 1 1 O glColor Green glVertex3f 1 0 1 0 0 glColor Blue glVertex3f 1 1 0 glColor Yellow glVertex3f 1 1 0 glEnd glwindow swapbuffers w update window glcontext release release the rendering context loop Chapter 9 OpenGL 53 open the OpenGL window glwindow open 200 200 opengl eventhandler This program can be loaded to open the window gt load examples opengl scm The window callback can be seen to be a separate thread that receives events through the mailbox interface Please see Gambit C documentation for more information about threads and their mailbox interface Each event has four parameters the window id w the event type t and two auxiliary parameters x and y The possible window event types are WINDOW_BUTTON1DOWN WINDOW_BUTTON1UP WINDOW BUTTON2DOWN WINDOW BUTTON2UP WINDOW BUTTONSDOWN WINDOW BUTTONSUP These events are generated by the mouse buttons The auxiliary parameters x and y contains the position of the mouse within the window at the time of the particular button event WINDOW CLOSE This is generated when the user cl

Download Pdf Manuals

image

Related Search

Manual manual manualslib manual car manual timesheet manual transmission manuale digitale manually meaning manual wheelchair manual arts high school manually update your device drivers windows manual labor manual definition manual for courts martial manual muscle testing manual muscle testing grades manually register devices with autopilot manual keyboard manual blood pressure cuff manualidades manual lawn mower manual transfer switch manual transmission cars for sale manual therapy cpt code manual libs manual autopilot enrollment

Related Contents

Bissell 1622 Vacuum Cleaner User Manual  User Manual - Philips Lighting  Arion AF9400PVR HDMI - TELE  Players HCMA 465  C120F User's Manual  HeliBEST MC400Q HeliBEST MC400QUAD User Man AD User Man  ID. 7.0, OD. 11.0 - Honda Power Products Indonesia  Dynamic Actuator  取扱説明書/2.4MB  

Copyright © All rights reserved.
Failed to retrieve file