Forums > MaxMSP

smooth rotation

May 27, 2013 | 8:11 am

hi forum,

a bit stupid question, but i didn’t find the answer easily…

how can i smooth the rotation of my videoplane ? because 180 degrees and -180 degrees are the same axe, but with a ramp (line or slide), it make a rotation :

<pre><code>

– Pasted Max Patch, click to expand. –

</code></pre>

thanks !

 


May 27, 2013 | 8:40 am

Since -180 and 180 have the same effect, just go directly from 179 to -180 (or, more simply, from 359 to 0). Get rid of the slide object in your patch. Also note that you should really count 0 to 359, not 0 to 360, in order to get a smooth cyclic effect.

I suggest using a [counter 0 359] object, or applying a [% 360] object to any constantly increasing or decreasing series of rotation values. Here’s an example:
Example 37: Display a video on a plane in OpenGL


May 27, 2013 | 8:55 am

thanks a lot christopher (nice site)

i’ve tried to convert polar coord to cartesian coordinates, and it’s works well
<pre><code>

– Pasted Max Patch, click to expand. –

</code></pre>


Viewing 3 posts - 1 through 3 (of 3 total)