rotate(3f) - [M_draw:TRANSFORMATION] Set up a rotation in axis axis where axis is one of x,y, or z. (LICENSE:PD)
Synopsis
Description
Options
Examples
See Also
subroutine rotate(angle, axis)
real angle character axis
Set up a rotation of coordinate system along specified axis, relative to current coordinate system.
angle Angle in degrees to rotate coordinate system, with clockwise angles being positive. axis Which axis to perform rotation about. Allowed values are x,
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
translate, pushmatrix, popmatrix, scale
Nemo Release 3.1 | rotate (3) | February 23, 2025 |