Hacker Newsnew | past | comments | ask | show | jobs | submit | djmips's commentslogin

This is avoiding an common but unnecesary round trip. When your inputs are vectors, angles are an unnecessary intermediate representation. You can substitute the geometric meaning of dot and cross product directly into the Rodrigues matrix and get by with less operations overall. It's more elegant, uses less instructions.


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? Without trig?

User moves cursor or stick a number of pixels/units. User holds key for a number of ms. This is a scalar: An integer or floating point. I pose this to the trig-avoiders: How do I introduce a scalar value into a system of vectors and matrices or quaternions?


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, you can usually stay in the derived values realm.)

Pro-tip I once learned from Eric Haines (https://erich.realtimerendering.com/) at a conference: angles should be represented in degrees until you have to convert them to radians to do the trig. That way, user-friendly angles like 90, 45, 30, 60, 180 are all exact and you can add and subtract and multiply them without floating-point drift. I.e., 90.0f is exactly representable in FP32, pi/2 is not. 1000 full revolutions of 360.0f degrees is exact, 1000 full revolutions of float(2*pi) is not.


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 mapping neatly to fp... I had not considered that in my reasoning.


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.


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



I don't think enough people realize the 'grind up your skeleton and re-name it "ashes"' part of cremation.

skeleton powder is more apt. Enough of the euphemism!


Eh?

Common knowledge in Blighty where the majority of funerals are cremations.

I'm puzzled why you appear to have a problem with this process?


I don't have a problem with the process. Is it common knowledge there? Maybe try aksing people what ashes are. I know it can be a touchy subject but I was pretty old when I found out in America.

This is Britain!

Most town museums of any size will have an Iron Age cremation urn full of burnt bone fragments on display. The ashes weren't exactly ground up back then.

https://learn.folkestonemuseum.co.uk/objects/iron-age-cremat...


Good news! I've been told our sun is too small to go supernova. ;-)

Glad you're still alive. I too find the most melancholy in not knowing - what happens next!


The sun won't go supernova, but it will become a red giant in about 5,000,000,000 years, which will have roughly the same consequences for life on earth.

To be honest, I can't quite predict if humanity truly survives within the next decade or two/three or a century. Let alone millions of times more than that amount.

We humans are very likely to be our own worst enemy. I would wish for the world to exist till the 5_billion year date that you mention.


There's a lot of Jupyter notebooks out there that have a similar format. I bet you could create an interactive Jupyter notebook with AI around a particular topic.

How much are you building 'from Scratch' when your language has primitives like diodeLadder(). :)

I'm just joshing - it's very cool!


In his defense, he built the entire language :-)

"If you wish to make an apple pie from scratch, you must first invent the universe" - Sagan

Sounds like a real bad day.

Yeah it was pretty spectacular. The author was a bit paranoid, had never shared his sources with anyone or backed them up anywhere or version controlled them to a remote SVN server or anything like that. And then his hard drive failed and Buzz development was over. IIRC there even was a community-organized crowdfunding campaign to fund some fancy data recovery company to try and revive the hard drive so he could get the sources back (not sure if this ever turned out happening).

Would someone be able to use any of the modern reversing programs on the exe to get something?

Some of that was done at the time to build the new Buzz.

(I was around at that time and a heavy Buzz user)


Surely what you're doing on the computer makes a huge difference.

Yeah, I don't think writing config files for labwc to display polled data from a software defined radio that's snooping on area weather stations is giving me dementia.

Not worried: "Associations between television/computer use and dementia in socially inactive older adults remain unclear, and optimal limits are unknown."


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: