Live data from Hacker News

Avoiding Trigonometry (2013)

iquilezles.org

31–40 of 92 posts

Re: Avoiding Trigonometry (2013)

#31
post #4

Norman Wildberger takes this to the extreme with Rational Trigonometry https://en.wikipedia.org/wiki/Divine_Proportions:_Rational_T... It eschews angles entirely, sticking to ratios. It avoids square roots by sticking to "quadrances" (squared distance; i.e. pythagoras/euclidean-distance without taking square roots). I highly recommend Wildberger's extensive Youtube channels too https://www.youtube.com/@njwildberger a…

He maybe considered contrarian but his math is sound.

With all due respect, no, it isn't. His drivel against set theory shows that he didn't even read the basic axiomatic set theory texts. In one of his papers, he is ranting against the axiom of infinity saying that 'there exists an infinite set' is not a precise mathematical statement. However, the axiom of infinity does not say any such thing! It precisely states the existence of some object than can be thought of as infinite but does not assign any semantics to it. Ironically, if he looked deeper, he would realize that the most interesting set theoretic proofs (independence results) are really the results in basic arithmetic (although covered in a lot of abstractions) and thus no less 'constructive' than his rational trigonometry.

Re: Avoiding Trigonometry (2013)

#32
post #31
post #4

Earlier quoted context omitted.

He maybe considered contrarian but his math is sound.

With all due respect, no, it isn't. His drivel against set theory shows that he didn't even read the basic axiomatic set theory texts. In one of his papers, he is ranting against the axiom of infinity saying that 'there exists an infinite set' is not a precise mathematical statement. However, the axiom of infinity does not say any such thing! It precisely states the existence of some object than can be thought of as…

"Sound" means free of contradiction with respect to the axioms assumed.

If you can derive a contradiction using his methods of computation I would study that with interest.

By "sound" I do not mean provably sound. I mean I have not seen a proof of unsoundness yet.

Re: Avoiding Trigonometry (2013)

#33
post #31
post #4

Earlier quoted context omitted.

He maybe considered contrarian but his math is sound.

With all due respect, no, it isn't. His drivel against set theory shows that he didn't even read the basic axiomatic set theory texts. In one of his papers, he is ranting against the axiom of infinity saying that 'there exists an infinite set' is not a precise mathematical statement. However, the axiom of infinity does not say any such thing! It precisely states the existence of some object than can be thought of as…

> It precisely states the existence of some object than can be thought of as infinite but does not assign any semantics to it

Can you elaborate on this? I think many understand that the "existence of some object" implies there is some semantic difference even if there isn't a practical one.

I really enjoyed Wildberger's take back in high school and college. It can be far more intuitive to avoid unnecessary invocation of calculation and abstraction when possible.

I think the main thrust of his argument was that if we're going to give in to notions of infinity, irrationals, etc. it should be when they're truly needed. Most students are being given the opposite (as early as possible and with bad examples) to suit the limited time given in school. He then asks if/where we really need them at all, and has yet to be answered convincingly enough (probably only because nobody cares).

Re: Avoiding Trigonometry (2013)

#34
post #12

I agree that use of trigonometry is almost always a smell, but e.g. in games there are so many cases where angles are just more useful and intuitive. I just grep-ed for "angle" in a game of mine and I find it for orienting billboard particles (esp. for particles a single angle is much better than a quat for example). Also for an FPS camera controller. It's much simpler to just store a pitch and a yaw and change that…

[flagged]

Quaternions break down for other situations. They cannot represent a rotation greater than 360 degrees. In an engine like Unity (which stores rotation as quats), you can use arbitrary Euler angles in the editor and it will work fine, but the scene file has to store 2 things. There is an additional m_LocalEulerAnglesHint property that covers this edge case.

Re: Avoiding Trigonometry (2013)

#35
For a graphics programmer acos(dot(x, y)) always raises an eyebrow. Since most of the time you actually want cos(theta) and even when you think you need the angle you probably don’t.

Re: Avoiding Trigonometry (2013)

#36

OK I have a genuine question outside the topic of TFA. Do people really prefer "orientate" over "orient"? This pattern baffles me. You don't get out of the subway and "orientate" yourself, you "orient" yourself. I mean I'm perfectly aware that language is a descriptive cultural process etc etc but man this bugs the crap out of me for some reason

I absolutely get out of the subway and orientate myself.

If I orient myself I have not taken the subway but the orient express, I’m afraid..

Re: Avoiding Trigonometry (2013)

#37
post #8

Also see https://fgiesen.wordpress.com/2010/10/21/finish-your-derivat...

Ok, this is very interesting, as after pondering my code and the article's main pt, I independently came to the same conclusion that angles are what introduces trig. I agree that maybe people might be using angles as intermediates, but IMO there are cases where they're the most realistic abstraction. For example, how can I map a user's mouse movements, or button presses to a change in rotation without a scalar value?…

The article answers to this near the very beginning.

> Now, don't get me wrong. Trigonometry is convenient and necessary for data input and for feeding the larger algorithm. What's wrong is when angles and trigonometry suddenly emerge deep in the internals of a 3D engine or algorithm out of nowhere.

In most cases it is perfectly fine to store and clamp your first person view camera angles as angles (unless you are working on 6dof game). That's surface level input data not deep internals of 3d engine. You process your input, convert it to relevant vectors/matrices and only then you forget about angles. You will have at most few dozen such interactive inputs from user with well defined ranges and behavior. It's neither a problem from edge case handling perspective nor performance.

The point isn't to avoid trig for the sake of avoiding it at all cost. It's about not introducing it in situations where it's unnecessary and redundant.

Re: Avoiding Trigonometry (2013)

#38
post #37

Earlier quoted context omitted.

Ok, this is very interesting, as after pondering my code and the article's main pt, I independently came to the same conclusion that angles are what introduces trig. I agree that maybe people might be using angles as intermediates, but IMO there are cases where they're the most realistic abstraction. For example, how can I map a user's mouse movements, or button presses to a change in rotation without a scalar value?…

The article answers to this near the very beginning. > Now, don't get me wrong. Trigonometry is convenient and necessary for data input and for feeding the larger algorithm. What's wrong is when angles and trigonometry suddenly emerge deep in the internals of a 3D engine or algorithm out of nowhere. In most cases it is perfectly fine to store and clamp your first person view camera angles as angles (unless you are wo…

Ah you're right! Then I believe the author and I are indeed on the same page.

Re: Avoiding Trigonometry (2013)

#39
post #14

>poorly designed third party APIs I think this is missing the reason why these APIs are designed like this: because they're convenient and intuitive Its rare that this kind of performance matters, or that the minor imprecisions of this kind of code matter at all. While its certainly true that we can write a better composite function, it also means that.. we have to write a completely new function for it Breaking thin…

> I think this is missing the reason why these APIs are designed like this: because they're convenient and intuitive

Agreed. In my view, the method the author figured out is far from intuitive for the general population, including me.

Re: Avoiding Trigonometry (2013)

#40

Norman Wildberger takes this to the extreme with Rational Trigonometry https://en.wikipedia.org/wiki/Divine_Proportions:_Rational_T... It eschews angles entirely, sticking to ratios. It avoids square roots by sticking to "quadrances" (squared distance; i.e. pythagoras/euclidean-distance without taking square roots). I highly recommend Wildberger's extensive Youtube channels too https://www.youtube.com/@njwildberger a…

Stuff like this is what really interests me in trying to imagine how differently aliens might use things that we consider to be immutable fundamentals.
Post reply on HN