C INTERNATIONAL AVS CENTER C (This disclaimer must remain at the top of all files) C C WARRANTY DISCLAIMER C C This module and the files associated with it are distributed free of charge. C It is placed in the public domain and permission is granted for anyone to use, C duplicate, modify, and redistribute it unless otherwise noted. Some modules C may be copyrighted. You agree to abide by the conditions also included in C the AVS Licensing Agreement, version 1.0, located in the main module C directory located at the International AVS Center ftp site and to include C the AVS Licensing Agreement when you distribute any files downloaded from C that site. C C The International AVS Center, MCNC, the AVS Consortium and the individual C submitting the module and files associated with said module provide absolutely C NO WARRANTY OF ANY KIND with respect to this software. The entire risk as to C the quality and performance of this software is with the user. IN NO EVENT C WILL The International AVS Center, MCNC, the AVS Consortium and the individual C submitting the module and files associated with said module BE LIABLE TO C ANYONE FOR ANY DAMAGES ARISING FROM THE USE OF THIS SOFTWARE, INCLUDING, C WITHOUT LIMITATION, DAMAGES RESULTING FROM LOST DATA OR LOST PROFITS, OR ANY C SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES. C C This AVS module and associated files are public domain software unless C otherwise noted. Permission is hereby granted to do whatever you like with C it, subject to the conditions that may exist in copyrighted materials. Should C you wish to make a contribution toward the improvement, modification, or C general performance of this module, please send us your comments: why you C liked or disliked it, how you use it, and most important, how it helps your C work. We will receive your comments at avs@ncsc.org. C C Please send AVS module bug reports to avs@ncsc.org. C C Author: "insert name" (if users state on release form that they wish to C remain anonymous, a control number will be placed at this location) C Modifications: Who modified, date modified ( so donor does not receive blame C if modifications made and passed on to others do not work as described) c pointsample.f: print (numerically) the value at a point in a field. c ====================================================================== c c Created by: Ian Curington c Stardent Computer Limited c 15 Frederick Sanger Road c The Surrey Research Park c Guildford c Surrey GU2 5YD c United Kingdom c +44-483-505388 c email: ianc@Stardent.COM c c Modified: 18 January 90 ianc: modification of avsplot c 30 January 90 ianc: removed extra messages c c ====================================================================== C === avs module initialization, connection prototypes subroutine AVSinit_modules integer iport integer point_compute external point_compute external AVScreate_input_port integer AVScreate_input_port integer iparam C Set the module name and type call AVSset_module_name('point sample', 'renderer') C Create an input port for the required field input iport = AVScreate_input_port('input field', $ 'field 2D scalar uniform float', REQUIRED) C Get several control dials iparam=AVSadd_parameter(' X Position','integer', 1, 1, 999) iparam=AVSadd_parameter(' Y Position','integer', 1, 1, 999) C Tell AVS what function to call to do the compute call AVSset_compute_proc(point_compute) return end C === avs compute module, process incomming data integer function point_compute(f,nx,ny, & islicex,islicey) integer nx, ny, nz real f(nx, ny) integer islicex,islicey real value if ( islicex .le. 1 ) islicex = 1 if ( islicey .le. 1 ) islicey = 1 if ( islicex .gt. nx ) islicex = nx if ( islicey .gt. ny ) islicey = ny value = f (islicex, islicey) write (*,*) ' pointsample: x= ' & ,islicex,' y= ',islicey,' value= ',value C When we're done, we return 1 to indicate success point_compute = 1 return end