-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The smooth
algorithm uses incorrect proportionate constant 0.2775
#1150
Comments
TeX documents are intended for print publishing. I doubt that this is visible in print. Possibly related: #817 |
Well, the largest circle TeX can handle has a radius of 8191.99999pt (or about 113.353in, 287.916cm). The circle in the MWE has a radius of 1cm. The “zoom” can theoretically go up to 28791.6% (thus, the 1708.59% zoom is only 6% of the largest theoretical zoom). Besides, we use TeX to produce posters for presenting our scholar projects. These posters easily measure 1.5m–2m wide. A 1cm-radius circle at 1708.59% zoom is just a 17cm-radius circle, which is of reasonable size in a poster.
The point here is about the out-of-no-where (and wrong) constant If the difference is barely visible, would you rather leave an uncommented wrong value in the code? Or, because the difference is barely visible, we can take this opportunity to correct the value to |
It's not out-of-nowhere. You are basically using the wrong tool for circles. The idea for This is only one obscure use case. The option You don't need to scale the picture to print on a poster. That's the whole idea behind vector graphics. |
Oh, the manual. The manual describes the key
The value Moreover, as shown in #817, in another place of the TikZ code you are using You |
I already gave you an explanation and I am not trying to be right, frankly the difference is so tiny I don't even get why you are passionate about it. If you don't want to have an open discussion and already made up your mind then fine modify your values in the preamble and carry on. Otherwise try on some jagged lines and get a feeling what the differences are. And then MAYBE! the author of that code decided to tweak the values to make it more pleasing instead of being correct. But instead we are discussing some circle is not fitting. Yes it is not fitting. Why are you drawing circles with smooth in the first place? |
@ilayn But you didn’t give an explanation on the number My counter argument points out that the manual is not a reliable source, because the manual says “a [tension] value of 1 results in a circle”. Your screenshot with the big pointy arrow reflects my counter argument precisely. In order to generate a circle (aka, “depends on the details of plot”), I have to say Do you see the problem now? Which part of my last paragraph is not clear? And why accusing me of not wanting an open discussion, where I merely presented a counter argument about the problematic conflicting And there is no need for all caps (I think we’d agree that there’s no need to shout). |
I already asked twice try it on ragged line. That's one thing you don't do. Second, I am trying to tell you a tweak does not require an explanation. If the number is wrong up-to-uselessness then we fix it. Ask yourself the same question, why is it the "correct" values elsewhere but only here it is different. Otherwise you are just geeking out on a detail that I really don't care. You made up your mind so this is not going anywhere. I'll leave it to others to handle this. |
Maybe I’m reading too much into all of your comments and maybe I’m wrong. But I get the vibe that it is you who have made up your mind, that you don’t care about conflicting manual descriptions and code implementations. Yet you are the one accusing me “[not] want to have an open discussion and already made up [my] mind”. This issue opens with “manual says In hindsight, I should’ve provided a more “realistic use” to illustrate the deviation, instead of a simple “~1700% zoom”. So when @hmenke comments on “TeX used for prints”, I responded with “such deviation can appear in prints (e.g., in posters) with a reasonably large radius”. For some reasons, the conversation then drifted into something else. |
Brief outline of the bug
The
smooth
algorithm forplot
uses a proportionate constant for the distance between control points, so that—whentension=1
—four evenly spaced points on a circle will produce a closed path approximating the circle.According to
pgflibraryplothandlers.code.tex
, this proportionate constant is0.2775
. But this is the wrong value. The correct value should behalf of 4*(sqrt(2)-1)/3
, or0.27614
.Also, the manual says the default
tension
is0.55
. This is also wrong. The default istension=0.5
.Reference:
Minimal working example (MWE)
The text was updated successfully, but these errors were encountered: