~~waves~~

1

Please login or register to vote for this query.

(click on this box to dismiss)

RUN query, then click the GRAPH tab to view

Parenting

Q&A for parents, grandparents, nannies and others with a parenting role

declare @Radius float =500                                          --units radius (Radius=Diameter÷2)
declare @numberOfPositions float = 360                              --how many dots to draw for a circle
declare @radiansPerPosition float=(360/@numberOfPositions)*pi()/180 --'radians = degrees × pi / 180°
declare @x float, @y float
create table #xy (x float, label varchar(1000), y float)

set @x=0
while @x <= @numberOfPositions - 1  --Create circle
  begin
    set @y = Cos(2* @radiansPerPosition * @x) *@Radius 
    insert into #xy(x,label,y) values (@x,' ',@y) 
    set @x=@x+1
  end

set @x=0
while @x <= @numberOfPositions - 1  --Create circle
  begin
    
    set @y = Sin(2* @radiansPerPosition * @x) * @Radius 
    insert into #xy(x,label,y) values (@x,'  ',@y) 
    set @x=@x+1
  end


select * from #xy

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results