POV-Ray : Newsgroups : moray.win : how to make snake-like movement? : Re: how to make snake-like movement? Server Time
8 Jul 2024 10:32:34 EDT (-0400)
  Re: how to make snake-like movement?  
From: Lutz Kretzschmar
Date: 16 Oct 2001 10:18:28
Message: <6ifostsj8q2bj0g9tl50g4mnbqs3vl8ecl@4ax.com>
Hi sshelby, you recently wrote in moray.win:

> I would like to be able to create a chain of  spheres in Moray that could be
> moved in a snake-like fashion. 
I'm not sure I understand. What do you mean when you say that they
should then be moved in a snake-like fashion? Do you want to animate
them?

While Moray cannot directly place spheres like that, you could do it
with less work than manual placement by doing this:

Create a group/csg and add a sphere to it. Move the sphere along X to
a position that is as far away from the middle of the wave as the
crest should be (half the vertical distance between position 7/8 and
14/15).
Press Duplicate. Reset To Defaults. 
- Enable Orbit. If you want it to take 16 spheres to repeat the wave,
enter 22.5 in the Orbit Z field (Rotate can be disabled again, or you
can leave it. Repeat will automatically be set to 15). 
- Increase Repeat if you want more than one wave. 
- Enable Translation and set the Z field to the horizontal distance
you want between spheres. 
- Enable the Attach To Same Parent. 
- Click OK. This will create a stairway spiral-like pattern.

Now you will have this snake pattern in one of the views (if you
followed along, it will be the front view).

You now need to select each sphere and set the Y component of the
translation value to 0. This is most easily done by selecting the
first one, double clicking in the Trans-Y field, typing '0' then
Enter. The press Ctrl-Left to select the next one. Repeat until done.

If you feel up to writing a script, you could use the LUA plugin to
create a script that places the spheres.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

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