Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

spiral.f

Go to the documentation of this file.
00001 
00002 c
00003 c       Copyright (c) 1986,1987,1988,1989,1990,1991,1992,1993,
00004 c       by Steve McMillan, Drexel University, Philadelphia, PA.
00005 c
00006 c       All rights reserved.
00007 c
00008 c       Redistribution and use in source and binary forms are permitted
00009 c       provided that the above copyright notice and this paragraph are
00010 c       duplicated in all such forms and that any documentation,
00011 c       advertising materials, and other materials related to such
00012 c       distribution and use acknowledge that the software was developed
00013 c       by the author named above.
00014 c
00015 c       THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
00016 c       IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
00017 c       WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 c
00019 c
00020 c
00021 c---    subroutine:  spiral
00022 c
00023 c---    draws logarithmic spirals
00024 c               r       radius of spiral in inches
00025 c               a       number of spirals per inch
00026 c               t       angle of starting curve (degrees cc from x-axis)
00027 c               i       direction of spiral (+1 = ccl, -1 = cl)
00028 c               x,y     location of center
00029 c
00030         subroutine spiral (r,a,t,i,x,y)
00031         save
00032         pi=3.1415926
00033 c
00034         c1=.02*pi
00035         c2=2.*pi*a
00036         c3=2.*pi*t/360.
00037         call plot(x,y,3)
00038 c
00039         do 10 j=1,100*a*r
00040             th=c1*j
00041             ra=th/c2
00042             th=c3+i*th
00043             x1=x+ra*cos(th)
00044             y1=y+ra*sin(th)
00045             call plot(x1,y1,2)
00046 10      continue
00047         end

Generated at Sun Feb 24 09:57:17 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001