Rob Dixon wrote: > Dan Muey wrote: > > > > I've made a funtion to calculate the Fresnal zone for wireless > > connections. > > > > What I'd like to do is generate an image based on that. > > Something like the example at: > > http://ydi.com/calculation/fresnel-zone.php > > > > However the two connected points are rarely going to be at the > > same level so I'd need to draw the elipse > > At an angle instead of horizontally. > > > > GD's elipse or arc function will probably do what I want but it > > seems all I can specify are the center point and width and > > height. > > > > Is there a way to also specify the x/y of each point on the left > > and right side of the elipse? > > > > Make sense? > > Yes, but you're out of luck I'm afraid Dan. The best I can suggest > is that you use the 'filledPolygon' method and do the maths yourself.
There is another, more straightforward possibility here. Not *that* straightforward, I'm afraid <| ;-o) but conceptually so. I'm not sure about GD [I've never been able to get GD to load on my Win2K box] but if you use a builtin to calculate an ellipse of the right dimension, you could then use some basic angular rotation of the base shape. It certainly is not quick, which is probably why even high-end graphics applications seem to lack facilities for drawing such ellipses, but it can be pretty clear. Unfortunately, I have done very little in the way of mathematical operations in Perl, so I don't really know what functions Perl offers readily. Certainly an arctangent function could make this real swift. It might help to convert your locus to polar coordinates once the base ellipse is generated, then rotate it, then convert back to Cartesian. I must say, it's a question that has sorta gnawed at me ever since my first encounter with Win 3.11 "PaintBrush". Joseph > > (Sorry, that's 'math' over there isn't it.) Boy, you do like to raise the interesting liguistic [ergo philosophical] points, huh? I'm firmly straddling the fence on this one. So is mathematics a collection of discrete studies, or a many-faceted exploration in the quest for fgood 'ol capital-T "Truth"...? [...wandering off, eyes fixed on some distant horizon...] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>