Baldo's compass heading to .cin and .end heading conversion chart
YEARS! For years I have been wondering about what to do about .cin and .end file heading problems. Tonight, I was inspired and a solution occurred to me. I'll skip the details and explain this much:
Take a directional compass. Hold it at the 45° - 225° axis. Flip it over. That is the compass that DFBHD(TS) applies to camera heading entries in .cin and .end files. I tried drawing this on scrap paper. I tried to work out a simple math formula. I tried to work out a complex math formula. I considered drawing a wheel with 360 compass heading points and the .cin/.end equivalents. Then I realized it doesn't have to be a circle. It can be a list! From my notes: Code:
22:24 23.07.2022 |
Very nice, going to try this in joint ops. I'm not sure if they work in joint ops, but i remember playing with them in DFX.
|
Six column edit:
Code:
000 = 090 060 = 030 120 = 330 180 = 270 240 = 210 300 = 150 |
The math for this is:
output = ((360 - ((input - 90) % 360)) % 360) librecalc example: Code:
=MOD(360 - MOD(A1 - 90,360), 360) Code:
#include <stdio.h> |
Oh... I'm the giant on whose shoulder you stand... or maybe the apple that fell on Newton's head. Or like that one scientist that discovered microwaves 'cause the chocolate he liked to keep in his pocket kept melting in the lab he definitely should never have been snacking in.
I could tell people I am Devilsclaw's melted chocolate! They'll think I'm a weirdo, never speak to me again, and warn others not to! The catastrophic dream of the introvert. * sigh * I'm glad I could help. Edit: I can't figure out what the percent symbol means. The formulas are unclear to me. Subtract 90 from the MEd heading, then 'percent symbol' it with 360. Subtract that from 360, then 'percent symbol' it with 360. It's like listening to scottish people talking to each other. I can almost understand it, but the synapses I need are not connected. |
Quote:
|
% is the modulus which returns only the remainder of the division.
example 9 / 5 = 1 but 9 % 5 = 4 The above is C math. with out doubles/floats all values are integer real numbers. |
so (x % 360) will return 0 to 359 even if you put (329487392473 % 360) = 313 the value will be between the 0 to 359 range
|
So in C math, 9 / 5 doesn't mean "Nine divided by 5 (1.8)," rather "How many whole, unbroken fives fit in nine? (1)." And 9 % 5 asks for what's left after all the fives are gone and will always be less than five.
I think I've got it. And just now playing around with my calculator, I worked out that if you take the MEd heading and subtract 450, you get a negative of the .cin/.end heading you need, and if the answer is more than -360, add 360. 'Cause 130 - 90 = 40, and... oh wait. See 40 goes into 360 9 times with 0 left over, but we're looking for how many times 360 goes into 40, and I can't picture that in my head. Anyway, I was using the C math wrong and got a lot of zero, and I know we're looking for 320... But 130 - 90 = 40 + -360 = -320. But since 130 - 450 is the same as 130 - 90 + -360, that'll do. So, like, 13 - 450 = -437 + 360 = -77. The chart says 13 = 77. Heading minus 450, maybe plus 360, then invert. It's not the right way, but it's workable, and maybe less annoying than looking it up in a chart. Wow! Look at us all braining around today! |
|
All times are GMT -5. The time now is 04:35 PM. |
Powered by vBulletin®