marco@hpuamsa.UUCP (Marco Lesmeister) (09/20/88)
We here in the HP office in Amstelveen, Holland were asked to do a graphics benchmark for a customer. The benchmark contained a couple of little programs made for a silicon graphics machine. The first benchmark is a program that draws a line from the middle of the screen, 128 pixels long. This line is being rotated 3600 times by 1/10 degree, so an almost filled up circle appears. The source for the silicon graphics machine follows: $include /usr/include/fgl.h call ginit call viewpo(0,1023,0,767) call ortho2(0.,1023.,0.,767.) call cursof call color(0) call clear call linewi(1) call color(7) call transl(511.,384.,0.) do 10 i=1,3600 call rotate(1,'z') call move2i(0,0) call draw2i(128,0) 10 continue call gexit end We made a look-alike program in fortran (that was the question) with star- base. This program contains a few subroutines to deal with the rotations and translations, because starbase has no routines to do rotations of objects (lines in this case) as far as I know of. This is the program we wrote: include '/usr/include/starbase.f1.h' program b1 include '/usr/include/starbase.f2.h' integer *4 fildes integer *4 cill integer *4 arg1(64),arg2(64) fildes=gopen('/dev/crt'//char(0), OUTDEV, 'hp98731'//char(0), INIT) arg1(1)= FALSE call gescape(fildes,SWITCH_SEMAPHORE,arg1,arg2) call vdc_extent(fildes,0.,0.,0.,1279.,1023.,0.) call view_port(fildes,0.,0.,1023.,767.) call translate2d(fildes,384.,511.) PI=3.14152 angle=(2. * PI)/3600. do 10 i=i,3600 call rotate2d(fildes,angle,3) call move2d(fildes,0.,0.) call draw2d(fildes,128.,0.) call make_picture_current(fildes) 10 continue cill=gclose(fildes) end subroutine identity2d(M) real M(2,3) M(1,1)=1. M(1,2)=0. M(1,3)=0. M(2,1)=0. M(2,2)=1. M(2,3)=0. end subroutine translate2d(fildes,x,y) integer *4 fildes real M(2,3) real x real y call identity2d(M) M(1,3)=x M(2,3) = y call view_matrix2d(fildes,M,PRE_CONCAT_VW) end subroutine rotate2d(fildes,angle,axis) integer *4 fildes integer *4 axis real angle real M(2,3) call identity2d(M) M(1,1) = cos(angle) M(2,1) = -sin(angle) M(1,2) = -M(2,1) M(2,2) = M(1,1) call view_matrix2d(fildes,M,PRE_CONCAT_VW) end The problem is, that our 9000/835 Turbo SRX runs slower than then the machine (silicon grapghics) the customer currently has, and which they want to replace, because it is to slow. But according to the data-sheets the performance of the Turbo SRX should not be this bad. Since this is a very urgent question for us, and a very important one to, I want to ask you if you have got any idea on how this poor performance is possible. Maybe it is due to my programming skills, but then it might be something else. Greetings, Marco Lesmeister, AE, HP Holland