## Draw a spiral

0

(click on this box to dismiss)

Run query and go to the "GRAPH" tab

Q&A for linguists, teachers, and students wanting to discuss the finer points of the Latin language

``````--calculate circle points

declare @Radius decimal(28,23) = 1400  --float
declare @spirals float = 10
declare @numberOfPositions float = 36 ---
declare @radiansPerPosition float = (360 / @numberOfPositions) * pi() / 180.0 --'radians = degrees × pi / 180°
declare @xStop float, @yStop float
create table #x (x float, y float)
declare @z float, @spiral int=0

while @spiral <= @spirals
begin
set @spiral=@spiral+1
set @z=0
while @z <= @numberOfPositions - 1
begin --calculate points
insert into #x(x,y) values (@xStop,@yStop)  --write to table (double the height)
set @z=@z+1
end
end

print @z
select x,' ',y from #x
union all select 2660.0,'   ',1333.0 --the keep circle away from edge
union all select -2660.0,'     ',-1333.0``````

### Enter Parameters

Options:
-
Switch to meta site
Hold tight while we fetch your results
:records returned in :time ms:cached