Hey Richard and everybody else check this out!!!!

Hey Richard and everybody else check this out!!!!

I got ten trillion on the mag and its still a perfect dot in the middle of the error plotter.

I cheated and dialed in the 50 multipliers and put them into an array.

Without the sqr() normalization, it doesn't make a circle but the degrees are correct. With the normalization it corrects it to a perfect circle.

Uncomment the atan2(s,c) below the pset's and check out the degree output.

Code: Select all

`'================================================================`

' Albert's .0018 in green

' approximations measured relative to the reference circle ... blue

Const As Double mag = 10000000000000 ' magnification of errors

'================================================================

Dim As Double t, tt, grad, q, s, c, dx, dy, x, y, r = 1.1

Dim As Double sqr_root

Screen 19

Dim As Integer w, h, depth

Screeninfo w, h, depth

Window (-r * w / h, -r) - (r * w / h, r) ' maintain pixel aspect

'----------------------------------------------------------------

Line(-c, 0)-(c, 0), 1 ' x axis

Line(0, -c)-(0, c), 1 ' y axis

Const As Double Pion2 = 2 * Atn(1)

For t = 0 To 4 * Pion2 Step Pion2 / 1000

x = Cos(t)

y = Sin(t)

Pset(x, y), 1 ' reference circle

Pset(x*.1, y*.1), 1 ' one tenth of circle at centre

Next t

'================================================================

'Albert's .0018 formula for a 200 degree pi

dim as double sarc,carc,sgrad2,cgrad2,inc,mul,array(50)

dim as double steps = 1

dim as double deg = atn(1)/100

array(0) = 0

array(1) = .00181483069342619

array(2) = .001812809472848158

array(3) = .001810836982114657

array(4) = .0018089127416807663671

array(5) = .001807036286436822

array(6) = .001805207165387777

array(7) = .001803424941344635

array(8) = .001801689190627545

array(9) = .001799999502780157

array(10)= .001798355480294862 '3

array(11)= .00179675673834854

array(12)= .001795202904548505

array(13)= .00179369361868824

array(14)= .001792228532512706

array(15)= .00179080730949286

array(16)= .001789429624609087

array(17)= .001788095164143335

array(18)= .00178680362547963

array(19)= .001785554716912746

array(20)= .001784348157464822

array(21)= .00178318367670963

array(22)= .0017820610146043725

array(23)= .001780979921328732

array(24)= .00177994015713099275

array(25)= .0017789414921811045

array(26)= .001777983706430438

array(27)= .001777066589478105

array(28)= .00177618994044369

array(29)= .001775353567846257

array(30)= .0017745572894894167

array(31)= .0017738009323524395

array(32)= .001773084332487164

array(33)= .001772407334920695

array(34)= .00177176979356369825

array(35)= .00177117157112423

array(36)= .00177061253902698

array(37)= .001770092577337868

array(38)= .00176961157469387

array(39)= .00176916942823804

array(40)= .001768766043559595

array(41)= .00176840133463906

array(42)= .001768075223798385

array(43)= .00176778764165597

array(44)= .00176753852708653

array(45)= .001767327827185835

array(46)= .001767155497240195

array(47)= .001767021500700705

array(48)= .00176692580916219

array(49)= .00176686840234694

array(50)= .0017668

for grad = 0 To 100 Step steps

if grad <= 50 then mul = array(grad) else mul = array(100-grad)

inc = grad * 2

sgrad2 = inc

cgrad2 = 200 - inc

sarc = deg * inc

carc = deg * (200-inc)

s = sarc * ((1- (sgrad2 * mul ) ) * .01)

c = carc * ((1- (cgrad2 * mul ) ) * .01)

sqr_root=sqr(c*c+s*s)

s=s/sqr_root

c=c/sqr_root

'----------------------------------------

r = 1 + mag * (Sqr(c*c + s*s) - 1) ' magnify radius error

x = c * r

y = s * r

Pset (+x, -y), 10

Pset (+x, +y), 10

Pset (-x, -y), 10

Pset (-x, +y), 10

'line(0,0)-(+x,-y),14

'line(0,0)-(+x, y),14

'line(0,0)-(-x,-y),14

'line(0,0)-(-x, y),14

'print atan2(s,c)*100/pion2'(deg*200)

t = grad * Pion2 / 100

dx = c - Cos(t)

dy = s - Sin(t)

Circle(mag * dx, mag * dy), 0.01, 10 ' plot the scatter

Next grad

'================================================================

Sleep

'================================================================