POV-Ray : Newsgroups : povray.animations : how to move my molecule... : Re: how to move my molecule... Server Time
17 May 2024 04:02:22 EDT (-0400)
  Re: how to move my molecule...  
From: Chris B
Date: 10 Aug 2007 10:01:10
Message: <46bc6fa6@news.povray.org>
"mave" <kum### [at] studentsntuacuk> wrote in message 
news:web.46938683d8092208b95cc49a0@news.povray.org...
> hiii,
> m developing an animation of a drug carrier. initially i hv sucessfully
> created one model having a sphere which is completly encapsulated with a
> four tail molecules. i hv succesfully created one animation in which this
> sphere having molecules around revolving on x axis.
>
> now i want to show evry molecule ( four tail) coming and attaching to the
> sphere. how to do that... m stuck...
>

Hi Kumar,
You could define a 'swim' path for each molecule using a spline, then, 
through the animation use the clock or the frame number to position and 
orient the molecule along that spline. See Spline_Trans in the help which 
aligns an object to a spline for a given time value

You should declare your molecule obect so that the point that will attach to 
the sphere is at the origin with a know orientation (e.g. sticking straight 
up). Add a copy of the molecule to the scene and orient it using 
Spline_Trans.

The end of each spline should reach the sphere, touching it at right angles 
to the surface at that point. You could use a factor with the clock variable 
so that the molecules don't all hit the surface at the same time. You could 
also use an #if construct to change the behaviour after the molecule reaches 
the sphere so that, for example, it spins along with the sphere.

If you want molecule 1 to hit the surface 80% of the way through the 
animation then incorporate an #if condition that says, when clock<=0.8 use 
Spline_Trans to align it, passing Spline_Trans a parameter of clock/0.8. 
Then if clock>0.8 simply attach it to the sphere before you rotate and 
position the sphere.

Regards
Chris B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.