Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drawing a SPIRAL
#10
Here is the complete Edited version of the Spiral macro

Code:
Sub Main

Dim r As Double
Dim a As Double
Dim s(1000) As Double
Dim n As Double

dcUpdateDisplay False
dcSelectAll
If dcIsSelected Then dcEraseSelObjs
dcSetSplineParms dcRED, dcFILL, dcNORMAL

r = InputBox("Enter outside Radius","Spiral","2")
r2= InputBox("Enter inside Radius","Spiral","0")
sp2= InputBox("Enter spacing","Spiral",".18")

a = 0
n = 0
sp=sp2/18

While r > r2
  n = n + 1
  s(n*2-1) = Cos(a*5/180*3.14)*r
  s(n*2) = Sin(a*5/180*3.14)*r
  r = r - sp
  a = a + 4
Wend
dcCreateSpline s(1), n, False

dcViewAll
dcUpdateDisplay True

End Sub
Reply


Messages In This Thread
Drawing a SPIRAL - williamj - 07-07-2012, 11:43 AM
RE: Drawing a SPIRAL - i44troll - 07-07-2012, 03:49 PM
RE: Drawing a SPIRAL - williamj - 07-08-2012, 07:04 AM
RE: Drawing a SPIRAL - i44troll - 07-08-2012, 10:08 AM
RE: Drawing a SPIRAL - williamj - 07-08-2012, 03:11 PM
RE: Drawing a SPIRAL - i44troll - 07-08-2012, 05:01 PM
RE: Drawing a SPIRAL - williamj - 07-22-2014, 11:11 AM
RE: Drawing a SPIRAL - AlwMVMO - 07-22-2014, 02:57 PM
RE: Drawing a SPIRAL - williamj - 07-23-2014, 09:57 PM
RE: Drawing a SPIRAL - AlwMVMO - 03-24-2016, 06:53 PM
RE: Drawing a SPIRAL - williamj - 03-24-2016, 07:32 PM
RE: Drawing a SPIRAL - AlanCooper - 03-26-2016, 07:46 PM
RE: Drawing a SPIRAL - AlwMVMO - 03-26-2016, 10:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)