Earlier quoted context omitted.
For graphics rendering Euler equation doesnt matter. Colours are 0.0-1.0 and have no relation to reality, but it works. Same with rotations (if we’re not using Quaternikns)
> For graphics rendering Euler equation doesnt matter. Huh?? "Euler angles" are one of the most popular representations in computer graphics! The only other good alternative is quaternions, where as you say this also matters!
Turns are Better than Radians (2022)
131–140 of 225 posts
Re: Turns are Better than Radians (2022)
#132Earlier quoted context omitted.
I can only imagine what a ridiculous problem it would be to try to re-do, for example, the Vincenty formula for distance between two latitude/longitude points on an oblate spheroid (the earth) if it couldn't use radians. https://en.wikipedia.org/wiki/Vincenty%27s_formulae https://www.johndcook.com/blog/2018/11/24/spheroid-distance/ Further, inverse vincenty is pretty much an essential in anything that needs to find t…
I absolutely love how full Wikipedia is of completely useless pages like the Vincenty's Formulae one, where someone has just gone "look this is what it says in my maths textbook" without any explanation. No discussion of why you'd use this over for example the Haversine function, of course, just a straight out copypasta and a demonstration of how clever someone is at the mathematical notation markup. Incidentally you…
Haversine is strongly deprecated in even short distance applications like planning a 35 km point to point licensed band radio microwave link, because you risk having both slightly the wrong distance and the azimuth figure being off by a tenth of a degree.
Vincenty in python form is quite compact. Karney by comparison is something like 1000 lines of code. And the difference is going between like a few mm precision to nanometers.
Re: Turns are Better than Radians (2022)
#133Earlier quoted context omitted.
The author's not talking about doing math, but about porting math into code. Counting turns is the same as counting cycles. People do that all the time. It works fine. And this math is kind of a mess. exp(x) is its own derivative but the log is not. (d/dx)log(x) = 1/x But, agreed, if you're going to do calculus, use radians.
> The author's not talking about doing math, but about porting math into code. If your code doesn't look like the math it's "ported" from, the odds of it being bad code go up like 100x
Re: Turns are Better than Radians (2022)
#134Earlier quoted context omitted.
I can only imagine what a ridiculous problem it would be to try to re-do, for example, the Vincenty formula for distance between two latitude/longitude points on an oblate spheroid (the earth) if it couldn't use radians. https://en.wikipedia.org/wiki/Vincenty%27s_formulae https://www.johndcook.com/blog/2018/11/24/spheroid-distance/ Further, inverse vincenty is pretty much an essential in anything that needs to find t…
I absolutely love how full Wikipedia is of completely useless pages like the Vincenty's Formulae one, where someone has just gone "look this is what it says in my maths textbook" without any explanation. No discussion of why you'd use this over for example the Haversine function, of course, just a straight out copypasta and a demonstration of how clever someone is at the mathematical notation markup. Incidentally you…
Re: Turns are Better than Radians (2022)
#135I like to store angles as turns in my own code, because (as noted) it makes quarter-turns computable without rounding. OTOH if you need, say, twelfths of a turn, you might want to just store angles as degrees since that’s already common. Michael Spivak, in Calculus (3rd ed p. 301) considers the unit choice to be a property of the function and initially defines sin° and sinʳ (before settling on sin meaning sinʳ) and c…
It's because both radians and degrees are are a ratio of a length to another length and are thus dimensionless. No matter how you measure it, all angles are without a unit. It's most obvious with radians but it's also the case with degrees. Using radians, you are guaranteed to not introduce unusual extra terms to rescale angles, if you use any other scale of angle you will have to keep track of extra terms. That may…
https://news.ycombinator.com/item?id=45129081
Now it is customary to standardized on the radius. Early Indian astronomers and mathematicians standardize on the arc length of a minute.
Re: Turns are Better than Radians (2022)
#136Earlier quoted context omitted.
> The author's not talking about doing math, but about porting math into code. If your code doesn't look like the math it's "ported" from, the odds of it being bad code go up like 100x
I tried to make my code exactly match the math it came from, but I didn’t have enough memory to store sqrt(2)
Re: Turns are Better than Radians (2022)
#137Earlier quoted context omitted.
In another comment I made in this thread https://news.ycombinator.com/item?id=49373317 I think it came to the understanding that a "turn" is similar to a dimensionless quantity, as it takes the full circle/cycle as a fundamental 1. Apparently, using the turn as a unit allows one to get rid of pi and e in Euler's formula in favor of 1 and -1.
Yeah. @ttoinou too, I think, had the same thing in mind. https://news.ycombinator.com/item?id=49371421
Re: Turns are Better than Radians (2022)
#138I think the author is either being disingenuous or doesn’t understand the subject if they don’t honestly address the reason radians are used in the first place. I’m leaning towards the latter, because I can’t imagine someone having an ulterior motive for pushing for trig reform like this, lol. Radians really are the natural unit for trigonometry. With that said, I certainly agree that a lot of code would be simplifie…
You might have misunderstood TFA. No push for trig reform, just a consideration on what internal representation is optimal in code. Imagine it like someone suggesting (understandably) that you express memory sizes in hex: no push to make everybody stop using decimal numbers!
Re: Turns are Better than Radians (2022)
#139The math is definitely not fine with turns, because your Euler formula e^ix = cos x + i sin x no longer holds. We can use a base other than e , namely B = e^2pi which around 535.4916. This doesn't have the nice e properties like d/dx e^x = e^x. The elegant fact that the base of the natural logarithm, which produces an exponential function that is its own derivative, also shows up as the basis for the above Euler's fo…
However,
Proportion of code where radians are used to represent rotation in 2D (i.e. turns): 99.9999%
Proportion of code where radians are used to perform higher degree derivatives, symbolic computation, etc: 00.0001%
Re: Turns are Better than Radians (2022)
#140Earlier quoted context omitted.
Yeah. @ttoinou too, I think, had the same thing in mind. https://news.ycombinator.com/item?id=49371421
I see, maybe it's common sense but I do like "rediscovering" basic facts for myself. (:
I remember things the best (only) when I discover them for myself. Slow progress but high retention.