POV-Ray : Newsgroups : povray.general : Mathematics help needed, please. : Re: Mathematics help needed, please. Server Time
12 Aug 2024 13:23:06 EDT (-0400)
  Re: Mathematics help needed, please.  
From: Josh English
Date: 11 Feb 1999 13:54:49
Message: <36C32879.94B081E5@spiritone.com>
Each sphere is spaced 1/6th of the distance between your two points...

#declare Endpoint1 = <some vector>;
#declare Endpoint2 = <some other vector>;

I don't know how youa re declareing them...so here is a basic shell

#declare Length = Endpoint2 - Endpoint1; // gives a single vector starting at the
origin

#declare point1 = Length*1/6 + Endpoint1;
#declare point2 = Length*2/6 + Endpoint1;
#declare point3 = Length*3/6 + Endpoint1;
#declare point4 = Length*4/6 + Endpoint1;
#declare point5 = Length*5/6 + Endpoint1;

So your five spheres are at point1 through point5. Hopefully you should see that
Endpoint2 is
equal to Lenght*6/6 + Endpoint1, which is why we are dividing by sixths instead of
fifths.

Good Luck

Josh English
eng### [at] spiritonecom

Andrew Cocker wrote:

> Okay, here's my problem. I'm working on an anim.
> Let's say I have two points in space. Joining these, I have a thin piece of elastic
( or
> similar stretchable material ). Threaded on this elastic are a number (
provisionally 5 )
> of spheres, spaced evenly.
> As the two points move around, how do I get the vector of each sphere as they remain
> evenly spaced along the elastic?
> I need the vector as each sphere will eventually become a blob component.
>
> Many thanks
>
> Andy

--
Josh English
eng### [at] spiritonecom
www.spiritone.com/~english


Post a reply to this message

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