As already mentioned by others, radians are not arbitrary units for angles; in fact, they are the "natural" "units", so to speak. By definition, an angle is just the ratio of a circular arc ( s ) to its radius ( r ), θ = s / r (as an exercise, imagine how to apply this definition to the angle between two intersecting lines). When the length of the circular arc equals its radius ( s = r ), the angle subtended is exact…
why radius and not diameter?
Turns are better than radians
431–440 of 494 posts
Re: Turns are better than radians
#432Earlier quoted context omitted.
Pico8 is 128x18 res, so I think the maximum number of visibly unique lines you could draw from one point is 512. You can't even express sub-one-degree (sub-1.422222 really) rotations on Pico8 visually without subsampling etc.
Interesting. I couldn't imagine asteroids without at least 1 degree accuracy feeling right, but I just fired up a pico8 emulation of asteroids and it had what seemed like about 24 steps of rotation, and played beautifully. Funny how my memory gave it way higher resolution. https://sazazel.itch.io/pico-8-asteroids
Re: Turns are better than radians
#433Earlier quoted context omitted.
I see where you're coming from, if the formulas end up having weird numbers like 535.4916 or numbers like 2.718 or 6.28318 then obviously there's something suspicious about the equation. But small correction though. You got the number wrong, it's actually much more weird than any of those mentioned. The actual equation you come to for ncos an nsin is: (-1)^(2x) = ncos(x) + i nsin(x) And yes, -1 is a very weird number…
That's a nice result. If we rearrange the products in the exponent we get 2πix πi2x ( πi ) 2x e -> e -> (e ) Where e^(πi) is -1. That shows there is something to the turns units; we can express the analog of the Euler identity using exponentiation using a base and factor which are integers. Huge selling point for turns, IMHO.
Ok, then let’s measure angles in quarter-turns! Then the equation becomes even nicer:
i^x = cos(x) + isin(x)
Beautiful! :-0
Except not. Because you’re obscuring the connection of sin/cos with their hyperbolic counterparts. I.e. this is no longer true:
sinh(x) = -isin(ix)
cosh(x) = cos(ix)
Also, this new convention obscures the connection with the exponential map of Lie groups.
I.e. the exponential map of the complex unit circle as a Lie group is:
e^ix = cos(x) + isin(x)
Similarly, the exponential map of the unit hyperbola of the split-complex plane is:
e^jx = cosh(x) + jsinh(x)
Similarly, for the group of unit quaternions:
e^q = cos(|q|) + sin(|q|)(q/|q|)
These are deep connections, which would be obscured by using anything other than radians.
Re: Turns are better than radians
#434Earlier quoted context omitted.
The Dutch version was SOSCASTOA, with a picture of a ship called the Castoa sending out an SOS because it was sinking. That picture really helped. And I even remember what it means: SOS: sine = opposing side divided by diagonal (schuine) side CAS: cosine = adjacent divided by diagonal TOA: tan = opposing divided by adjacent. I don't think I've ever used it for anything practical, but I can still reproduce it after al…
The one that I still use is the 3-4-5 rule to ensure a right angle. Still use that one to chalk off sporting fields of play.
Re: Turns are better than radians
#435The author makes the point that turns allow for exact representation of many commonly used angles, but with binary floating point, many common angles (1/6 of a turn, for example) are inexact. This could be addressed by using a whole number other than 1 to represent a turn ... one that is a multiple of 3 (or 3x3) and 5, and while we're at it, 2 (or 2x2x2), so most commonly-used angles are whole numbers! That gives us…
There's no need to represent fractions of a turn as binary fractions, since you don't ever need more than 1 turn. You can represent fractions of a turn as (pair of integer) rationals, and round on the rare occasion that the denominator gets too big.
Helix.
Re: Turns are better than radians
#436Questions like this ultimately have answers related to what formulas are most often deployed - more a sociological question than anything else.
Re: Turns are better than radians
#437In my view, because pi crops up unavoidably in math, if you concoct a "unit" to get rid of pi in one place, it will simply crop up somewhere else, perhaps in a denominator. For instance: The ratio of rise to run for small angles. Working in optics, radians are such nice units: A milliradian is a millimeter per meter or a "mil" per inch.
That doesn't mean you shouldn't try to put it in a convenient place.
One way to think of the post is: where you want pi to come up?
With arc length parametrization f(r) = (cos(r), sin(r)), it comes up in the parameter space (one turn: 0 ). If you had the whole thing in terms of turns, you'd instead have (as a primitive) some kind of function g(t); with one full round for 0 . It'd then have to be true that
f(2 pi t) = g(t) = (cos(2 pi t), sin(2 pi t)).
Pi would come up in the velocity:
f'(r) = (-sin(r), cos(r)) = if
(i u means rotate the vector u by 90 degrees counter-clockwise)
g'(t) = 2 pi f'(2 pi t) = 2 pi (i f(2 pi t)) = 2 pi (i g(t))
Before, you had |f'| = 1. Now you have |g'| = 2 pi.
For classical physics (kinematics and dynamics) applications and classical geometrical applications (curvature, etc), it's really convenient to have that speed term (|f'|) being 1. This is one of the major motivations for arc length parametrization.
By the way, this can't be understated. It really simplifies kinematics, dynamics, geometry, etc, having |f'| = 1 throughout. It's not just for circles. This can be done for an extremely large class of curves and it makes the related math much more understandable and easier to deal with.
For a lot of computer graphics (I believe this is where Casey comes from), you care less about tradicional mathematics for physics and geometry. So you'd rather (maybe) take this pi appearing in the parameter space and push it to the velocity.
Re: Turns are better than radians
#438A motivation seems to be performance (avoiding useless multiplications followed by divisions by the same factor). I'm not sure that you really "pay" for these multiplications, with code optimization?
I strongly suspect that in most cases, yes, you do. The only time you wouldn't pay this cost is if the multiplication outside of the sin() call and the multiplication inside of it can be constant folded together. That requires the call to sin() to have its code inlined at the callsite. Given how large most sin() implementations are, I would be fairly surprised if it does get inlined. The only way to answer this is to…
Re: Turns are better than radians
#439A motivation seems to be performance (avoiding useless multiplications followed by divisions by the same factor). I'm not sure that you really "pay" for these multiplications, with code optimization?
I strongly suspect that in most cases, yes, you do. The only time you wouldn't pay this cost is if the multiplication outside of the sin() call and the multiplication inside of it can be constant folded together. That requires the call to sin() to have its code inlined at the callsite. Given how large most sin() implementations are, I would be fairly surprised if it does get inlined. The only way to answer this is to…
Re: Turns are better than radians
#440Earlier quoted context omitted.
sin(x) ~~ x only in radians, so honestly that's reason enough. Once in a while we get programmers wanting to disrupt mathematical notation for whatever reason... Worst I've seen so far was one arguing that equations should be written with long variable names (like in programming) instead of single letters and Greek letters. Using turns because it's a little easier in specific programming cases is just as short-sighte…
What really bothers me is that mathematicians seemingly never distinguish between doing and presenting mathematics. You can do your own scribbles with single letters, so do I, it works fine. But when you present maths in a scientific article, maths book, Wikipedia article or similar, your convenience as a writer should be secondary. Your task is to present information to someone who does not already know the subject.…