This looks great!
Thanks Pix,
I actually have another problem and the way you solved this last one makes it difficult for me to see how to attack it. Its a very similar problem.
I need to compare two angles. This function should test to what degree the two angles oppose one and other. For example if the first angle is 0 and the second 180 then this would be total opposition so the function should return 1. If the second angle is 90 (and the first still 0) then thats a half opposition so the output should be 0.5. Now the way this problem relates to the first is if the second angle is 270 then it should return the same results as if it were 90. (because its still half-opposition, just in the other direction)
Any pointers/ideas would be appreciated.
Thanks Ben
----- Original Message ----- From: pix pix@test.at Date: Sunday, January 26, 2003 6:31 pm Subject: [PD] Re: [PD-dev] Circular Line object?
oops, here it is.
On Mon, 27 Jan 2003 00:30:05 +0100 pix pix@test.at wrote:
hey, cool problem...
it's not really a dev question tho, because you can do it within
pd with
some number juggling. attached is an example.
it just gets every number into a form which is +/- 180 from the last known value of the line (which is run through mod so it is always 0-360).
pix.
On Fri, 24 Jan 2003 21:27:35 -0500 bbogart@ryerson.ca wrote:
Hello all,
I'm working with a lot of angles in my current project (0-
360degrees> > where 0 is the same point as 360)
I want to tween between one angle and another. If my initial
angle is
10 degrees, my desination angle is 270 degress. I want an
object which
will take the shortest route around the circle to tween to the desination angle. If I use "line" I have my angle go from 0-90-
180-270
Clock wise when I want it to go 10-0-270 Counter clockwise.
The line
object does work, but only when the angles differ by less than 180 degrees. So the question is how do I make a patch which tweens the angle by the shortnest distance?
Any help would would be appreciated.
In case your hoping I'm not talking about a rotating object so
I can't
just use a negative rotation angle.
Thanks Ben
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev
hehe, it's like doing crossword puzzles :) ... solution attached.
pix.
On Mon, 27 Jan 2003 21:06:03 -0500 bbogart@ryerson.ca wrote:
This looks great!
Thanks Pix,
I actually have another problem and the way you solved this last one makes it difficult for me to see how to attack it. Its a very similar problem.
I need to compare two angles. This function should test to what degree the two angles oppose one and other. For example if the first angle is 0 and the second 180 then this would be total opposition so the function should return 1. If the second angle is 90 (and the first still 0) then thats a half opposition so the output should be 0.5. Now the way this problem relates to the first is if the second angle is 270 then it should return the same results as if it were 90. (because its still half-opposition, just in the other direction)
Any pointers/ideas would be appreciated.
Thanks Ben
----- Original Message ----- From: pix pix@test.at Date: Sunday, January 26, 2003 6:31 pm Subject: [PD] Re: [PD-dev] Circular Line object?
oops, here it is.
On Mon, 27 Jan 2003 00:30:05 +0100 pix pix@test.at wrote:
hey, cool problem...
it's not really a dev question tho, because you can do it within
pd with
some number juggling. attached is an example.
it just gets every number into a form which is +/- 180 from the last known value of the line (which is run through mod so it is always 0-360).
pix.
On Fri, 24 Jan 2003 21:27:35 -0500 bbogart@ryerson.ca wrote:
Hello all,
I'm working with a lot of angles in my current project (0-
360degrees> > where 0 is the same point as 360)
I want to tween between one angle and another. If my initial
angle is
10 degrees, my desination angle is 270 degress. I want an
object which
will take the shortest route around the circle to tween to the desination angle. If I use "line" I have my angle go from 0-90-
180-270
Clock wise when I want it to go 10-0-270 Counter clockwise.
The line
object does work, but only when the angles differ by less than 180 degrees. So the question is how do I make a patch which tweens the angle by the shortnest distance?
Any help would would be appreciated.
In case your hoping I'm not talking about a rotating object so
I can't
just use a negative rotation angle.
Thanks Ben
PD-dev mailing list PD-dev@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev