I should have mentioned the sin() and cos() functions expect radians, not degrees. You can convert degrees to radians within the functions like this:
cos( radians( angle-in-degrees ) ) cheers, Colin On 10 February 2012 18:29, Adam Hazard <[email protected]> wrote: > Ha, yes a bit, but it is still good reference for the future. Your > approach would most likely have been cleaner, as for Colin's expression, I > had to normalize it to fit in a 360 degree slider, as it was giving full > rotations between 0-6.something degrees on the rotation slider. Unless I > was applying it wrong somehow from the get go. Anyways, appreciate all the > great replies. And my little gizmo is working great. Thanks > > -Adam > > Dan Ring wrote: > >> >> No worries, although I think it was more verbose than what Adam wanted :) >> Ha, yes a bit, but it is still good reference for the future. Your >> approach would most likely have been cleaner, as for Colin's expression, I >> had to normalize it to fit in a 360 degree slider, as it was giving full >> rotations between 0-6.something degrees on the rotation slider. Unless I >> was applying it wrong somehow from the get go. Anyways, appreciate all the >> great replies. And my little gizmo is working great. Thanks >> >> -Adam >> >> >> On 09/02/2012 21:21, Shailendra Pandey wrote: >> >>> quite interesting discussion. Thanks dan for the detailed explaination >>> >>> On 2/9/12, Adam Hazard<[email protected]> wrote: >>> >>>> This is the only suggestion I tried, because it seemed the easiest to >>>> implement, and so far it looks like it is working. thank you very much. >>>> >>>> >>>> -Adam >>>> >>>> Colin Alway wrote: >>>> >>>>> is this what you want ? >>>>> >>>>> inputs: >>>>> a 2d pivot point >>>>> a 2d reference point >>>>> a rotation slider >>>>> >>>>> output: >>>>> a 2d point rotating the reference around the pivot >>>>> >>>>> an expression for the destination point would be (pseudo-code): >>>>> >>>>> output.x = pivot.x + (reference.x - pivot.x) * cos( rotation ) - >>>>> (reference.y - pivot.y) * sin( rotation ) >>>>> output.y = pivot.y + (reference.x - pivot.x) * sin( rotation ) + >>>>> (reference.y - pivot.y) * cos( rotation ) >>>>> >>>>> >>>>> >>>>> >>>>> On 9 February 2012 02:01, Adam Hazard<[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> Anyone know how to have a rotation slider control a 2d point >>>>> rotating around another 2d point with an expression? >>>>> >>>>> Basically I want to know how the tracker derives rotation from 2 >>>>> points, but I guess in reverse. >>>>> >>>>> Or a way to hack this together by linking parameters. I haven't >>>>> found a solution. >>>>> >>>>> Thanks in advance >>>>> >>>>> -Adam >>>>> ______________________________**_________________ >>>>> Nuke-users mailing list >>>>> >>>>> [email protected].**co.uk<[email protected]> >>>>> >>>>> <mailto:Nuke-users@support.**thefoundry.co.uk<[email protected]> >>>>> >, >>>>> http://forums.thefoundry.co.**uk/<http://forums.thefoundry.co.uk/> >>>>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/** >>>>> nuke-users<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> colin alway >>>>> ------------------------------**------------------------------**------------ >>>>> >>>>> >>>>> ______________________________**_________________ >>>>> Nuke-users mailing list >>>>> [email protected].**co.uk<[email protected]>, >>>>> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/> >>>>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/** >>>>> nuke-users<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> >>>>> >>>> ______________________________**_________________ >>>> Nuke-users mailing list >>>> [email protected].**co.uk<[email protected]>, >>>> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/> >>>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-users<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> >>>> >>>> ______________________________**_________________ >>> Nuke-users mailing list >>> [email protected].**co.uk<[email protected]>, >>> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/> >>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-users<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> >>> >> >> >> > ______________________________**_________________ > Nuke-users mailing list > [email protected].**co.uk<[email protected]>, > http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/> > http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-users<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> > -- colin alway
_______________________________________________ Nuke-users mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
