SBP : Copyright 1996 J.D.Kromkowski :3:e:e:s3 "FRM",7999,10552:1,200,16,1,0,3,0,0S0,0,0 eee H%2500:K%2000:X1%1500:Y1%1500:X%1850:Y%2600 @20,20,"Let's mark a center point." 2:|1,H%,K%,30,30:1 @20,20,"Now, let's create a line to rotate","about the center point." 4:|3,X%,Y%,X1%,Y1%,2:1 @100,100,"First, let's create create a grid." 1:|3,H%,0,H%,5000,2:|3,0,K%,5000,K%,2:1 @260,100,"QUADRANT I":@260,260,"QUADRANT II" @100,260,"QUADRANT III":@100,100,"QUADRANT IV" X1%H% Y1%K%pQuad%1 X1%H% Y1% K%pQuad%2 X1% H% Y1%K%pQuad%3 X1% H% Y1% K%pQuad%4 X$(X1%):Y$(Y1%):Quad$(Quad%) Line1$"Evaluting the end point of the line "X$","Y$"," Line2$"we can see that it falls in Quadrant "Quad$"." |1,X1%,Y1%,40,40:1 @15,15,Line1$,Line2$ A%180: Use quadrant to determine Skip%45:Counter%1 There IS easier way TO do this,but can't remember trig equalities (NewX1%X1%).001 Aiter% 1000 (NewY1%Y1%).001 R1%((H%X1%) 2(K%Y1%) 2) NewX1%H%(R1%(A%P180)):NewY1%K%(R1%(A%P180)) NewX1% X1%pDirection$"forward": NewX1%X1%pDirection$"backward": Direction$ "forward" A%A%Skip%Counter% "backward" A%A%Skip%Counter%  Counter%Counter%2.00001:Aiter%Aiter%1 1:Adjust%0qA%k3 |1,H%(R1%(Adjust%P180)),K%(R1%(Adjust%P180)),20,20 1:Adjust% a$(A%)" is the number of degrees the point is rotated" b$"from the generalized cartesian point (r,0). Sorry about flicker." @20,20,a$,b$ a$"Consequently, to rotate this point, let's say 45 degrees," b$"we need to add 45 degrees to the prior adjustment figure." @20,20,a$,b$ fortyfive%45A%:ff$(fortyfive%) a$"In other words, rotating this particular point 45 degrees is the same as" b$"rotating it "ff$" degrees from the generalized point (r,0)." @20,20,a$,b$ 2:Adjust%A%qA%45k2 |1,H%(R1%(Adjust%P180)),K%(R1%(Adjust%P180)),25,25 1:Adjust% 5:|1,H%(R1%(fortyfive%P180)),K%(R1%(fortyfive%P180)),30,30 1 a$"Now, open up the program and examine and refine the code to rotate" b$"the other end point of the line. J.D.Kromkowski" @200,200,a$,b$  ADD FORM 3,NewX%,NewY%,NewX1%,NewY1%,2