'Circular' Scaling Question
Hello all,
Mathematics related problem, maybe someone with more knowledge can help me out:
I'm currently scaling 0. to 360. to get -180. to 180. so that 180. = 0.
I'd also like to scale 0. to 360. to get 90. to 90. so that 180. = -90.
I hope that makes enough sense? Sorry maths isn't my strong point, I've encountered difficult problems before and found my way via trial and error but this has me stumped.
Thanks
This is what I have so far, got to be a simpler way:
DEvo - What I mean is it needs to stay within the -180. to 180. range but 0. needs to equal 90. rather than -180.
Isn't this the first one? The second one is a bit more tricky. I'll see if i can wrap my head around that one.
`
We almost posted simultaneous, i think you need a sin/cos/tan function for that.
Yes FRid that's right, that was no problem. As you say the second problem is trickier and my patch doesn't do it very cleanly.
Thanks for the input and interest so far! I have faith someone can help me!
This is my best solution so far, realised I didn't need that gate before:
You could also use [% 360] to get what you need.
Ah man. I wish i had paid more attention during class. Feels a bit like cheating.
This one is correct
Oops, no not correct according to the diagram. I focussed too much on the 0. 360. >> 90. 90. my bad.
Concerning the diagram whats up with -180/180 in the innercircle? And won't poltocar/cartopol help out here somehow?
Thanks for all of the suggestions, I've now got several methods to compare. What a nice brain workout eh?
FRid - the 180/-180 is the overlap for each side of the circle. 0 to 180 on one side 0 to -180 on the other. Sorry that was a quick Paintbrush diagram.
That was also my bad (again!) After taking a second look i got it. Maybe i should start paying more attention in general :) And these are nice puzzles indeed.
FRid
@ p.m. Nice one! Somehow the "funny" symbols remain obscure to me
[%] The funny symbol? :) That's a good way to call it.
The modulo is perfectly suited for circular operation since it will always output a value within a given range, whatever is the input. Combining a [% 360] with a [-180], you will always get a output within -180,180. If you want that to be scaled, just do the scale operation before.
Yeah, i didn't have a better description at hand. For some reason i focussed too much on the exclamation-mark family of operators and modulo never really came to mind.
Thanks for the heads up,
FRid