We should probably write this up. Yes, this is precisely what quaternions
can get you.

# set to final state
moveto 0.0 { -46 -870 492 142.18} 300.0 0.0 0.0 {61.260506 38.7915 44.659}
50.97134 {0.0 0.0 0.0} 281.9351 50.269466 50.0
qfinal = quaternion(script("show rotation"))

# set to initial state

moveto 0.0 { -142 866 480 107.35} 100.0 0.0 0.0 {61.260506 38.7915 44.659}
50.97134 {0.0 0.0 0.0} 8.481314 102.86942 50.0;

qinitial = quaternion(script("show rotation"))

# calculate steps

dq = qfinal / qinitial / 20

# now loop and save

write image "image0.jpg"
for (i = 1; i <= 20; i = i+1)
   rotate quaternion @dq
   f = "image"+i+".jpg"
   write image @f
end for



Bob

On Sat, Apr 18, 2009 at 4:06 PM, rgb <[email protected]> wrote:

> Ralf Stephan wrote:
> > Hello,
> > let's say I have two orientations and want to write 50
> > intermediate frames as image files:
> >
> > ---From:
> > moveto 0.0 { -142 866 480 107.35} 100.0 0.0 0.0 {61.260506 38.7915
> > 44.659} 50.97134 {0.0 0.0 0.0} 8.481314 102.86942 50.0;
> > ---To:
> > moveto 2.0 { -46 -870 492 142.18} 300.0 0.0 0.0 {61.260506 38.7915
> > 44.659} 50.97134 {0.0 0.0 0.0} 281.9351 50.269466 50.0
> >
> > I tried changing all seven variables 1/50 of their difference, and
> > write an image each time but that gave not the expected result.
> > Is it possible to reconstruct the values the second moveto goes through,
> > or in other words, is it possible to make an external animation
> > or movie from jmol scripts containing moveto?
> >
> Have you tried using quaternions? I explored them a while ago and it was
> extremely easy to set up the scripting. I was going to say you could
> search the list's archives but I just tried to do that and couldn't
> restrict the search to Jmol. I don't have access to the computer that
> has the info on it so maybe somebody else can tell us how to search the
> archives.
>
> Rich
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to