C Library Functions  - invokeobj (3)

NAME

invokeobj(3f) - [M_draw] invoke object with specified transformations (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Autho
License

SYNOPSIS

subroutine invokeobj(xt,yt,zt,xs,ys,zs,xr,yr,zr,iobject)

    real,intent(in)    :: xt,yt,zt
    real,intent(in)    :: xs,ys,zs
    real,intent(in)    :: xr,yr,zr
    integer,intent(in) :: iobject

DESCRIPTION

save and restore the coordinate system while invoking an object with specified translation, rotation, and scaling.

OPTIONS

xt,yt,zt
  linear transforms
xs,ys,zs
  scaling
xr,yr,zr
  rotation in degrees
iobject
  object to invoke

EXAMPLES

Sample program

   program demo_invokeobj
   use M_draw
   implicit none
   real :: a, angle, step
   integer :: i, idum
   ! set window size
      call prefsize(700,700)
      call prefposition( 0, 0)
      call vinit (’X11’)
      a=1.0
   ! make an object to draw ( a disk with an arrow on it)
      call makeobj(12345)
      call polyfill(.TRUE.)
      call color( 5)
      call circle( 0.0, 0.0, a)
      call color( 3)
      call makepoly()
      call move2( 0.00*a, 0.80*a)
      call draw2( 0.50*a, 0.30*a)
      call draw2( 0.20*a, 0.30*a)
      call draw2( 0.20*a,-0.80*a)
      call draw2(-0.20*a,-0.80*a)
      call draw2(-0.20*a, 0.30*a)
      call draw2(-0.50*a, 0.30*a)
      call draw2( 0.00*a, 0.80*a)
      call closepoly()
      call polyfill(.FALSE.)
      call color(7)
      call linewidth(20)
      call circleprecision(200)
      call circle( 0.0, 0.0, a)
      call vflush()
      call closeobj()
   ! draw the disk invoking different rotation
      ANGLE=0.0
      STEP=0.4
      idum=backbuffer()
      idum=-1
      if(idum.ne.-1)then
         do i=1,int(360/STEP*10)
            idum=backbuffer()
            call clear()
            call invokeobj(0.0,0.0,0.0,1.0,1.0,1.0,ANGLE,ANGLE,ANGLE,12345)
            ANGLE=ANGLE+STEP
            call swapbuffers()
         enddo
      else
         ANGLE=45.0
         call invokeobj(0.0,0.0,0.0,1.0,1.0,1.0,ANGLE,ANGLE,ANGLE,12345)
         idum=getkey()
      endif
      call vexit()
   end program demo_invokeobj

AUTHO

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 invokeobj (3) February 23, 2025
Generated by manServer 1.08 from 5aacd932-f965-4a0b-b9d9-dc7dc20f9542 using man macros.