POV-Ray : Newsgroups : povray.binaries.tutorials : How to move an object along a particular spiral. Server Time19 Jul 2024 10:16:23 EDT (-0400)
 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 08:45:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.466409278716e6a5d9815f580%40news.povray.org",
"headline": "How to move an object along a particular spiral.",
"dateCreated": "2007-06-04T12:45:01+00:00",
"datePublished": "2007-06-04T12:45:01+00:00",
"author": {
"@type": "Person",
"name": "Joe"
}
}
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. :)
```
 From: Grassblade Subject: Re: How to move an object along a particular spiral. Date: 4 Jun 2007 16:15:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.466471dd7064b1eddc3003d40%40news.povray.org",
"headline": "Re: How to move an object along a particular spiral.",
"dateCreated": "2007-06-04T20:15:01+00:00",
"datePublished": "2007-06-04T20:15:01+00:00",
"author": {
"@type": "Person",
}
}
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.
```
 From: Joe Subject: Re: How to move an object along a particular spiral. Date: 4 Jun 2007 18:45:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.466495c47064b1ed998929610%40news.povray.org",
"headline": "Re: How to move an object along a particular spiral.",
"dateCreated": "2007-06-04T22:45:01+00:00",
"datePublished": "2007-06-04T22:45:01+00:00",
"author": {
"@type": "Person",
"name": "Joe"
}
}
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?
```
 From: kurtz le pirate Subject: Re: How to move an object along a particular spiral. Date: 6 Jun 2007 14:18:27 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#kurtzlepirate-3A0A52.20182606062007%40news.povray.org",
"headline": "Re: How to move an object along a particular spiral.",
"dateCreated": "2007-06-06T18:18:27+00:00",
"datePublished": "2007-06-06T18:18:27+00:00",
"author": {
"@type": "Person",
"name": "kurtz le pirate"
}
}
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
```
 From: Grassblade Subject: Re: How to move an object along a particular spiral. Date: 10 Jun 2007 14:20:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.466c407f7064b1edfbefdfa0%40news.povray.org",
"headline": "Re: How to move an object along a particular spiral.",
"dateCreated": "2007-06-10T18:20:01+00:00",
"datePublished": "2007-06-10T18:20:01+00:00",
"author": {
"@type": "Person",
}
}
"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.
```