C Library Functions  - rotate (3)

NAME

rotate(3f) - [M_draw:TRANSFORMATION] Set up a rotation in axis axis where axis is one of ’x’,’y’, or ’z’. (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
See Also

SYNOPSIS

subroutine rotate(angle, axis)

     real angle
     character axis

DESCRIPTION

Set up a rotation of coordinate system along specified axis, relative to current coordinate system.

OPTIONS

angle Angle in degrees to rotate coordinate system, with clockwise angles being positive.
axis Which axis to perform rotation about. Allowed values are ’x’,

EXAMPLES

Sample usage

      program demo_rotate
      use M_draw
      implicit none
      real :: x, y, size
      integer :: idum

! set up display call prefsize(300, 300) call prefposition(200, 10) call vinit(’X11’)

SIZE = 1.2 X = -0.75 Y = 0.75 call ortho2(-SIZE, SIZE, -SIZE, SIZE) call color(3) call clear() ! create an object to repeatedly draw call makeobj(1) call polyfill(.true.) call color(1) call rect(0.0, 0.0, X, Y) call polyfill(.false.) call linewidth(200) call color(2) call rect(0.0, 0.0, X, Y) call closeobj() ! draw object, rotating coordinate system between instantiations call callobj(1) call rotate(45.0, ’z’) call callobj(1) call rotate(45.0, ’z’) call callobj(1) call circle(0.0, 0.0, X/3) idum = getkey() call vexit()

end program demo_rotate

SEE ALSO

translate, pushmatrix, popmatrix, scale


Nemo Release 3.1 rotate (3) August 28, 2026
Generated by manServer 1.08 from f44bc1da-a313-4f40-ab6b-c01fd77863d8 using man macros.