POV-Ray : Newsgroups : povray.general : Mathematics help needed, please. : Re: Mathematics help needed, please. Server Time
12 Aug 2024 13:18:36 EDT (-0400)
  Re: Mathematics help needed, please.  
From: Andrew Cocker
Date: 11 Feb 1999 13:08:11
Message: <36c31c8b.0@news.povray.org>
Thanks David,
that seems to work fine. However, my two points are going to be returned elswhere as a
vector ie <-1,1,0>. Is there a way of extracting these values and using them in your
code?
This is related to my other recent post regarding Chris Colefax's 'AutoClck.mcr'. The
two
points will actually be bouncing spheres connected by the method below.

Thanks,

Andy


gemelli david wrote in message <36C2F531.3240D7E7@imerir.asso.fr>...
>Maybe it is this:
>
>#declare xpos = xPoint2 - xPoint1;
>#declare ypos = yPoint2 - yPoint1;
>#declare zpos = zPoint2 - zPoint1;
>#declare incx = xpos / NbSpheres;
>#declare incy = ypos / NbSpheres;
>#declare incz = zpos / NbSpheres;
>#declare i = 1;
>#while (i < NbSpheres)
>    #declare xpos = xPoint1 + (incx * i);
>    #declare ypos = yPoint1 + (incy * i);
>    #declare zpos = zPoint1 + (incz * i);
>    sphere {<xpos, ypos,zpos>, Radius ... }
>    #declare i = i + 1;
>#end
>I'm not absolutly sure but it must be a good start ?
>
>        David GEMELLI
>

>
>> 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
>
>
>


Post a reply to this message

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