« Return to Thread: Circles are not very circular

Re: Circles are not very circular

by Till Tantau-3 :: Rate this Message:

Reply to Author | View in Thread

Dear Ken, dear Mark,


the number 0.555 used in pgf is actually a bit embarrassing... I  
choose the value 0.555 about a zillions ago (this was already in pgf  
when pgf.sty was still a single file (!) ). It was found by trial and  
error and looked "good enough" and no one ever complained. Naturally,  
I should have looked up the right number.

The value 0.5522847 gives much better results, indeed.

Mark, 0.55191496. does not seem to give as good results as 0.5522847.  
Also, in the calculation from the link Ken send I think it is proved  
that 4/3(sqrt(2)-1) should be optimal. Where does 0.55191496 come from?

Anyway, I fixed this in the CVS, which now uses 0.5522...

Many thanks for pointing this out.


While we are at it, do you have a good formula (implementable in  
TeX...) for computing the lengths of the support vectors for arcs? For  
instance, what is the correct length of the support vectors for an arc  
of 80 degrees? or 30.234 degrees? Currently, some more trial and error  
numbers are used and the results are, well, not-so-good...


Best regards,
Till


Am 09.10.2008 um 20:06 schrieb Mark Wibrow:

> Hi,
>
> Your suggestion of 0.55228475 is what I understand to give the
> *maximum* error for cubic bezier approximation of circular arcs. The
> minimum error (again as I understand it - I am not a maths or a CAD
> person) is actually provided by 0.55191496.
>
> However, having just looked at \pgfpathellipse I see that the "magic
> number" used is actually 0.555, which is neither of these two. I don't
> why this number was chosen, but there may have been a good reason.
>
> I suggest submitting this either as a bug or a feature request.
>
> In the mean time replacing 0.555 in \pgfpathellipse with numbers of
> your choice may provide preferable results (and will effect all paths
> such as circle and ellipse in TikZ). \pgfpathellipse is defined in
> \pgfcorepathconstruct.code.tex
>
> Regards
>
> Mark
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> pgf-users mailing list
> pgf-users@...
> https://lists.sourceforge.net/lists/listinfo/pgf-users
>

--
Prof. Dr. Till Tantau
www.tcs.uni-luebeck.de/mitarbeiter/tantau


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

 « Return to Thread: Circles are not very circular