Re: [OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

2010-12-28 Thread Jim Graham
Aha! I finally figured out what I was missing. On 12/24/2010 4:43 PM, Denis Lila wrote: Line 1133 - I don't understand why that term has -q in it. The above link and the original code both computed essentially the arccos of this Basically, the negative comes in when you push all of the p term

Re: [OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

2010-12-28 Thread Jim Graham
Hi Denis, I'm attaching a test program I wrote that compares the old and new algorithms. Obviously the old one missed a bunch of solutions because it classified all solutions as 1 or 3, but the new one also sometimes misses a solution. You might want to turn this into an automated test for

Re: [OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

2010-12-28 Thread Jim Graham
Correction... On 12/28/2010 3:00 PM, Jim Graham wrote: math. (Though it begs the question - is "-q/sqrt(-p^3)" more accurate than "-q/(p*sqrt(-p)"? If p is < 1 then the cube is an even smaller number, does that matter?) Make that "-q/(-p*sqrt(-p))", or "q/(p*sqrt(-p))"...