Board index » delphi » D1: Drawing line from circle
c8...@aol.com (C8591)
Delphi Developer 
Fri, 04 Aug 2000 03:00:00 GMT

c8...@aol.com (C8591)
Delphi Developer 
Fri, 04 Aug 2000 03:00:00 GMT
D1: Drawing line from circleWant to draw a line of a certain length from a point on a circle radiating from Any help appreciated 
David Ullric
Delphi Developer 
Fri, 04 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuoteC8591 wrote: (So we MoveTo(X2,Y2) and then LineTo(X,Y), and the question is how to figure out what X and Y are). First the "outwards" case: The vector (X,Y)  (X2,Y2) should be (1) (X,Y)  (X2,Y2) = c*((X2,Y2)  (X1,Y1)) for some number c > 0 . If we can figure out what c should be we're c*sqrt((X2X1)^2 + (Y2Y1)^2). So c = L / sqrt((X2X1)^2 + (Y2Y1)^2) ; you plug this into (1) and you X = X2 + c*(X2  X1); (The thing to do is do all the calculations with floatingpoint types Drawing the line pointing into the circle is the same, except  sig.txt not found 
AlanGLLo
Delphi Developer 
Fri, 04 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleIn article <34E889F4.6...@math.okstate.edu>, David Ullrich Quote<ullr...@math.okstate.edu> writes: smartarse) by inspection C = L/R, because X = X2 + L/R*(X2  X1); X1(R)X2(L)X similarly for Y. Having said that, I've just worked out that sqrt((X2X1)^2 + (Y2Y1)^2) = R so Alan Lloyd 
Keiran Barbe
Delphi Developer 
Sat, 05 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleq 
Bill Dia
Delphi Developer 
Sat, 05 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleThe following routine can be used to a plot a new Procedure PixLoc(x,y : LongInt; Var x1, y1 : LongInt; distance,bearing : Bill C8591 <c8...@aol.com> wrote in article Quote> Want to draw a line of a certain length from a point on a circle 
David Ullric
Delphi Developer 
Sat, 05 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuoteAlanGLLoyd wrote: circle"  if we have a circle of radius 1 and another circle of radius 2 in the same problem it follows that 1 = 2. But that's just being pedantic about terminology, so never mind. Seriously: Of _course_ c is L / R ! I didn't say it wasn't, did I? We were not (Where did you think that sqrt((X2X1)^2 + (Y2Y1)^2) thing came from  sig.txt not found 
AlanGLLo
Delphi Developer 
Sun, 06 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleIn article <34E9DA5F.5...@math.okstate.edu>, David Ullrich Quote<ullr...@math.okstate.edu> writes: In article <19980216154001.KAA28...@ladder02.news.aol.com>, c8...@aol.com Quote(C8591) writes: I'd just rather calculate the easiest way, and I'd certainly rather not Alan Lloyd 
David Ullric
Delphi Developer 
Sun, 06 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuoteAlanGLLoyd wrote:  sig.txt not found 
C859
Delphi Developer 
Mon, 07 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuote>> Want to draw a line of a certain length from a point on a circle btw: tried " sqrt((X2X1)^2 + (Y2Y1)^2) " but got error #121 (Invalid Chris 
David Ullric
Delphi Developer 
Thu, 10 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuoteC8591 wrote: actually compiled that was by accident). The "^2" meant "squared"  this is sort of standard usage. (Like you really thought an explanation of a problem in highschool geometry was going to involve dereferencing a pointer?) If you have math.pas you can probably figure out how to  sig.txt not found 
Rudy Velthui
Delphi Developer 
Fri, 11 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleDavid Ullrich schrieb in Nachricht <34F071C6.5...@math.okstate.edu>... Quote>C8591 wrote: (sorry, but I'll have to use the word) BASIC. I know this is hard to accept for Delphians (like me). ;)) Pascal uses Sqr(X: Extended): Extended. Rudy Velthuis I couldn't find your sig.txt either ;) 
C859
Delphi Developer 
Fri, 11 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuote>> btw: tried " sqrt((X2X1)^2 + (Y2Y1)^2) " but got error #121 (Invalid meaning squared, I never knew that, learn something all the time. Chris 
David Ullric
Delphi Developer 
Fri, 11 Aug 2000 03:00:00 GMT
Re:D1: Drawing line from circleQuoteRudy Velthuis wrote: _no_ _code_ _at_ _all_ in what I wrote, just a bunch of mathematical expressions. (And x^y is extremely standard online notation for "x to the y", no doubt because of BASIC, (Fortran?), TEX, etc.)  sig.txt not found 