Manual Reference Pages  - rotate (3m_draw)

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
Example
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’,

EXAMPLE

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 (3m_draw) May 28, 2023
Generated by manServer 1.08 from 0de6c198-fc0f-4775-a75f-a39e3e50fc95 using man macros.