Hi-

I coded interpolation between arbitrary pymol views in slerpy using
quaternions.  You may be able to recycle some of that.  See:

http://www.pymolwiki.org/index.php/Slerpy


Joel 

-----Original Message-----
From: piu...@icsn.cnrs-gif.fr [mailto:piu...@icsn.cnrs-gif.fr] 
Sent: Tuesday, February 15, 2011 10:48 AM
To: Jason Vertrees
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Smoothing camera movements

Hi Jason,

Problem is, I'm trying to program an other head-tracking script for
PyMol. The PyMol script receives the coordinates from OpenCV and changes
the camera orientation accordingly in a loop so it is not possible to
use scenes.

The only solution I have found so far is to decompose the movement :

###
for i in range(10):
        cmd.turn('x',x_angle/10)
        cmd.turn('y',x_angle/10)
         cmd.refresh()
###

Quoting Jason Vertrees <jason.vertr...@schrodinger.com>:

> Hi,
>
> If you're only zooming around scenes with the camera, and not using 
> object motions, then "scenes" are the best way to go:
>
> fetch 1oky
> scene 001, store
>
> zoom br. first org
> scene 002, store
>
> ### cut below here and paste into script ### set_view (\
>      0.704781950,    0.201942384,   -0.680074394,\
>     -0.689321160,    0.421526819,   -0.589196265,\
>      0.167686298,    0.884044886,    0.436287463,\
>      0.000000000,    0.000000000,  -32.830085754,\
>     82.917518616,   17.755170822,   12.337598801,\
>     28.110042572,   37.550128937,  -20.000000000 )
> ### cut above here and paste into script ### scene 003, store
>
> Now you can recall the scenes via a script:
>
> scene 001, recall
>
> or you can use the pg-up and pg-down keys to interactively transition 
> to the next scene.  As always with scenes, you can interrupt the 
> transition by grabbing with the mouse, and PyMOL will smoothly 
> transition to the next scene when you're ready.
>
> Cheers,
>
>
> On Tue, Feb 15, 2011 at 4:48 AM,  <piu...@icsn.cnrs-gif.fr> wrote:
>> Hello everyone,
>>
>> I'm writing a script that interactively modifies the position of the 
>> camera with the commands cmd.turn and cmd.move. With these two 
>> commands, there is no transition from one position to another and 
>> that produce sluggish movements.
>>
>> Is there a way to animate the moves without making a movie (to keep 
>> it
>> interactive) ?
>>
>>
>> ---------------------------------------------------------------------
>> --------- The ultimate all-in-one performance toolkit: Intel(R) 
>> Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit
performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
>> Archives: 
>> http://www.mail-archive.com/pymol-users@lists.sourceforge.net
>>
>
>
>
> --
> Jason Vertrees, PhD
> PyMOL Product Manager
> Schrodinger, LLC
>
> (e) jason.vertr...@schrodinger.com
> (o) +1 (603) 374-7120
>




------------------------------------------------------------------------
------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio
XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to