POV-Ray : Newsgroups : povray.binaries.tutorials : How to move an object along a particular spiral. Server Time: 16 Dec 2018 00:47:52 GMT
  How to move an object along a particular spiral. (Message 1 to 5 of 5)  
From: Joe
Subject: How to move an object along a particular spiral.
Date: 4 Jun 2007 12:45:01
Message: <web.466409278716e6a5d9815f580@news.povray.org>
Anybody know how to move any object over the "Cornu spiral". I just started
this and I've been trying to use the parametric equations way because that
is what the spiral can be defined in. I get stuck when it comes to doing
the integrals in Pov-Ray. I don't even know if you can do integrals in
Pov-Ray. Thanks for any help. :)


Post a reply to this message

From: Grassblade
Subject: Re: How to move an object along a particular spiral.
Date: 4 Jun 2007 20:15:01
Message: <web.466471dd7064b1eddc3003d40@news.povray.org>
Of course you can do integrals in POV-ray. You can do anything with POV-ray.
*Fanatical glint in the eye*
You can obtain a numerical approximation of the integral by applying its
definition, i.e. take a very small dx, evaluate y and add dx*y to previous
sum in the loop.
You can also use the generalised hypergeometric solution, see
http://mathworld.wolfram.com/CornuSpiral.html The generalised
hypergeometric looks like a nasty customer to code, but it has the
advantage of being an exact solution.


Post a reply to this message

From: Joe
Subject: Re: How to move an object along a particular spiral.
Date: 4 Jun 2007 22:45:01
Message: <web.466495c47064b1ed998929610@news.povray.org>
Is there a way to evaluate the integral with a different program, transfer
that information to a file (a txt i guess) and have Povray read it from
that text file in order to animate a path for a sphere?


Post a reply to this message

From: kurtz le pirate
Subject: Re: How to move an object along a particular spiral.
Date: 6 Jun 2007 18:18:27
Message: <kurtzlepirate-3A0A52.20182606062007@news.povray.org>
In article <web.466495c47064b1ed998929610@news.povray.org>,
 "Joe" <Pre### [at] aolcom> wrote:

> Is there a way to evaluate the integral with a different program, transfer
> that information to a file (a txt i guess) and have Povray read it from
> that text file in order to animate a path for a sphere?


hum... just a try :

x=0
y=0

for i=1 ... n
  t=eval(fn)
  x=cos(2.pi.t)
  y=sin(2.pi.t)
  sx=sum(x)
  sy=sum(y)
  draw point at <xs,ys>


for cornu spiral fn => i^2/321



not tested :)

-- 
klp


Post a reply to this message

From: Grassblade
Subject: Re: How to move an object along a particular spiral.
Date: 10 Jun 2007 18:20:01
Message: <web.466c407f7064b1edfbefdfa0@news.povray.org>
"Joe" <Pre### [at] aolcom> wrote:
> Is there a way to evaluate the integral with a different program, transfer
> that information to a file (a txt i guess) and have Povray read it from
> that text file in order to animate a path for a sphere?

Yes, definitely, POV-ray can read ASCII text files, see 3.2.2.3 in the
documentation that comes with POVray (for Windows). For some reason the
same topic is numbered 2.2.2.3 in the on-line documentation:
http://www.povray.org/documentation/view/3.6.1/238/

If you make a search for "Handle" on the newsgroup, you should obtain some
really good examples of reading/writing ASCII files.


Post a reply to this message

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