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?…
My take as a graphics programmer is that angles are perfectly fine as inputs . Bring 'em! And we'll use the trig to turn those into matrices/quaternions/whatever to do the linear algebra. Not a problem. I'm a trig-avoider too, but see it more as about not wiggling back and forth. You don't want to be computing angle -> linear algebra -> angle -> linear algebra... (I.e., once you've computed derived values from angles…
Avoiding Trigonometry (2013)
71–80 of 92 posts
Re: Avoiding Trigonometry (2013)
#72Earlier quoted context omitted.
"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.
> "Sound" means free of contradiction with respect to the axioms assumed. Gödel wept.
An undecidable proposition is neither true nor false, it is not both true and false.
A system with undecidable propositions may be perfectly fine, while a contradictory system is useless.
Thus what the previous poster has said has nothing to do with what Gödel had proved.
Ensuring that the system of axioms that you use is non-contradictory has remained as useful today as by the time of Euclid and basing your reasoning on clearly stated non-contradictory axioms has also remained equally important, even if we are now aware that there may be undecidable things (which are normally irrelevant in practice anyway).
The results of Gödel may be interpreted as a demonstration that the use of ternary logic is unavoidable in mathematics, like it already was in real life, where it cannot always be determined whether a claim is true or false.
Re: Avoiding Trigonometry (2013)
#73Earlier quoted context omitted.
I think Americans tend to say "orient." I think English people tend to say "orientate."
I vote for "eastify".
Occident means "falling", so it can be used as an abbreviation when referring to the direction of the falling Sun.
"Orientate" is more correct etymologically to be used as a verb than "orient" ("rising"), and it comes from an expression that described how something is raised towards a certain direction.
I think that the reason why the verb "orient" has come to be preferred by some was that "orientated" seemed like a mouthful, so it was abbreviated to "oriented", whence a verb "orient" has been back-formed.
The guilty for "orientated" being so long is the habit of English of making verbs from Latin passive participles, instead of using just the verb stems, which leads to long verbal words and to clumsy English past participles derived from them. Latin also derived new verbal stems from passive participles, but those had a different meaning than the base verbal stem, being either frequentative or causative, so the extra length of such words was justified.
Re: Avoiding Trigonometry (2013)
#74The other thing it can give you is computationally exact results since rationals are closed over division. Sine is interesting because where the input is rational the output is almost always irrational and where the output is rational the input is almost always irrational. In computation the first time you use sine in a program you have injected approximation. If you want to build things like reproducible code and ge…
If you compute trigonometric functions where the arguments are binary floating-point numbers and you measure the angles in cycles, not in radians (using radians is always a huge mistake in my opinion), the results can be expressed exactly using rational operations and the sqrt function.
You could compute them symbolically and use such symbolic expressions for exact computation, like you use rational numbers.
If you compute them numerically, computing a sqrt does not need more time than a division and correct rounding or computing an arbitrary number of digits are also not more difficult than for division.
Of course, you typically do not care about this, so you can just compute the trigonometric functions approximately, like you also do with division and sqrt, and in a similar time.
Re: Avoiding Trigonometry (2013)
#75Also 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?…
In 2D, using either the angle or its tangent needs a single number. The third alternative is, as others have mentioned, to use a complex number (i.e. the cos and sin couple).
Any of these 3 (angle, tangent of angle and complex number) may be the best choice for a given problem, but for 2D graphics applications I think that using a complex number is more frequently the best. For 3D problems there are 3 corresponding alternatives, using a pair of angles, using a pair of tangents (i.e. coordinate ratios) or using a quaternion.
Specifying directions by the ratio between increments in orthogonal directions, instead of using angular measures, has always been frequent in engineering, since the Antiquity until today.
For something like cursor movement, the ratio between Y pixels and X pixels clearly seems as the most convenient means to describe the direction of movement.
Re: Avoiding Trigonometry (2013)
#76Earlier quoted context omitted.
My take as a graphics programmer is that angles are perfectly fine as inputs . Bring 'em! And we'll use the trig to turn those into matrices/quaternions/whatever to do the linear algebra. Not a problem. I'm a trig-avoider too, but see it more as about not wiggling back and forth. You don't want to be computing angle -> linear algebra -> angle -> linear algebra... (I.e., once you've computed derived values from angles…
Hah. I think we're and the author of both articles on the same page about this. (I had to review my implementations to be sure). I'm a fan of all angles are radians for consistency, and it's more intuitive to me. I.e. a full rot is τ. 1/2 rot is 1/2 τ etc. Pi is standard but makes me do extra mental math, and degrees has the risk of mixing up units, and doesn't have that neat rotation mapping. Very good tip about the…
Degrees are better than radians, but usually they lead to more complications than using consistently only cycles as the unit of measure for angles (i.e. to plenty of unnecessary multiplications or divisions, the only advantage of degrees of being able to express exactly the angle of 30 degrees and its multiples is not worth in comparison with the disadvantages).
The use of radians introduces additional rounding errors that can be great at each trigonometric function evaluation, and it also wastes time. When the angles are measured in cycles, the reduction of the input range for the function arguments is done exactly and very fast (by just taking the fractional part), unlike with the case when angles are measured in radians.
The use of radians is useful only for certain problems that are solved symbolically with pen on paper, because the use of radians removes the proportionality constant from the integration and derivation formulae for trigonometric function. However this is a mistake, because those formulae are applied seldom, while the use of radians does not eliminate the proportionality constant (2*Pi), but it moves the constant into each function evaluation, with much worse overhead.
Because of this, even in the 19th century, when the use of radians became widespread for symbolic computations, whenever they did numeric computations, not symbolic, the same authors used sexagesimal degrees, not radians.
The use of radians with digital computers has always been a mistake, caused by people who have been taught in school to use radians, because there they were doing mostly symbolic computations, not numeric, and they have passed this habit to computer programs, without ever questioning whether this is the appropriate method for numeric computations.
Re: Avoiding Trigonometry (2013)
#77Earlier quoted context omitted.
> "Sound" means free of contradiction with respect to the axioms assumed. Gödel wept.
If with an axiomatic system there are undecidable propositions, that is not the same with the axiomatic system being contradictory, i.e. where you can prove that a proposition is both true and false. An undecidable proposition is neither true nor false, it is not both true and false. A system with undecidable propositions may be perfectly fine, while a contradictory system is useless. Thus what the previous poster ha…
There are two well accepted definitions of soundness. One of them is the inability to prove true == false, that is, one cannot prove a contradiction from within that axiomatic system.
Re: Avoiding Trigonometry (2013)
#78Earlier 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?…
There are many applications where instead of angles it is more convenient to use the Y to X ratio (also the Z to X ratio in 3D), i.e. to use the tangent of the angle as a scalar that encodes the direction. In 2D, using either the angle or its tangent needs a single number. The third alternative is, as others have mentioned, to use a complex number (i.e. the cos and sin couple). Any of these 3 (angle, tangent of angle…
So, if you use the tan representation you have to carry that information separately. Furthermore, the code needs to correctly handle zero and infinity.
Tan of the half angle takes care of the first problem and is related to the stereographic transform. This works modulo one full rotation.
Re: Avoiding Trigonometry (2013)
#79Earlier quoted context omitted.
Hah. I think we're and the author of both articles on the same page about this. (I had to review my implementations to be sure). I'm a fan of all angles are radians for consistency, and it's more intuitive to me. I.e. a full rot is τ. 1/2 rot is 1/2 τ etc. Pi is standard but makes me do extra mental math, and degrees has the risk of mixing up units, and doesn't have that neat rotation mapping. Very good tip about the…
If you want consistency, you should measure all angles in cycles, not in radians. Degrees are better than radians, but usually they lead to more complications than using consistently only cycles as the unit of measure for angles (i.e. to plenty of unnecessary multiplications or divisions, the only advantage of degrees of being able to express exactly the angle of 30 degrees and its multiples is not worth in compariso…
Re: Avoiding Trigonometry (2013)
#80> we are performing an rather imprecise and expensive acos() call No, the acos() call is not expensive at all. There is hardware acceleration.We can calculate acos() with in 12 CPU instructions. https://git.musl-libc.org/cgit/musl/tree/src/math/i386/acos....