'Circular' Scaling Question

Medd's icon

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

Medd's icon

This is what I have so far, got to be a simpler way:

Max Patch
Copy patch and select New From Clipboard in Max.

Medd's icon

DEvo - What I mean is it needs to stay within the -180. to 180. range but 0. needs to equal 90. rather than -180.

FRid's icon

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.

`

Max Patch
Copy patch and select New From Clipboard in Max.

We almost posted simultaneous, i think you need a sin/cos/tan function for that.

Medd's icon

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!

Medd's icon

Attached a rough diagram demonstrating what I mean. Sorry for any confusion!

2577.CircScale.png
png
Medd's icon

This is my best solution so far, realised I didn't need that gate before:

Max Patch
Copy patch and select New From Clipboard in Max.

pm's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You could also use [% 360] to get what you need.

FRid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Ah man. I wish i had paid more attention during class. Feels a bit like cheating.

This one is correct

FRid's icon

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?

Medd's icon

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.

FRid's icon

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

pm's icon
Max Patch
Copy patch and select New From Clipboard in Max.

[%] 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.

FRid's icon

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