[UP]


Manual Reference Pages  - 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
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_drawplus, only : draw_interpret
   character(len=:),allocatable :: draw_cmds(:)
   draw_cmds=[ character(len=128) ::                                      &
   ’# set up display                                                    ’,&
   ’prefsize 300 300;prefposition 200 10;vinit X11;                     ’,&
   ’set SIZE=1.2                                                        ’,&
   ’color 3;clear;color 2; ortho2 -SIZE SIZE -SIZE SIZE                 ’,&
   ’set X=-0.75 Y=0.75                                                  ’,&
   ’# create an object to repeatedly draw                               ’,&
   ’makeobj 1                                                           ’,&
   ’polyfill .true.;color 1; rect 0 0 X Y                               ’,&
   ’polyfill .false.;linewidth 200;color 2 ;rect 0 0 X Y                ’,&
   ’closeobj                                                            ’,&
   ’# draw object, rotating coordinate system between instantiations   ’ ,&
   ’callobj 1                                                           ’,&
   ’rotate 45 z                                                         ’,&
   ’callobj 1                                                           ’,&
   ’rotate 45 z                                                         ’,&
   ’callobj 1                                                           ’,&
   ’circle 0 0 X/3                                                      ’,&
   ’getkey;vexit                                                        ’]
   write(*,’(a)’)draw_cmds
   call draw_interpret(draw_cmds,delimiters=’;’)
   end program demo_rotate

SEE ALSO

translate, pushmatrix, popmatrix, scale


rotate (3) March 11, 2021
Generated by manServer 1.08 from 3995116e-c4e0-4ff5-b5f1-fbbd1e2d9657 using man macros.