POV-Ray : Newsgroups : povray.binaries.scene-files : Spiral image macro Server Time18 Sep 2024 03:39:50 EDT (-0400)
 Spiral image macro (Message 1 to 4 of 4)
 From: Cousin Ricky Subject: Spiral image macro Date: 3 Feb 2022 19:49:52 Message: <61fc7830\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#61fc7830%241%40news.povray.org",
"dateCreated": "2022-02-04T00:49:52+00:00",
"datePublished": "2022-02-04T00:49:52+00:00",
"author": {
"@type": "Person",
"name": "Cousin Ricky"
}
}
I don't know how Matthew did his, but this is my take.

You will need SphereSweep from the Object Collection as a prerequisite.
SphereSweep can be obtained at:
https://github.com/CousinRicky/POV-SphereSweep
```

Attachments:

 From: m@b Subject: Re: Spiral image macro Date: 4 Feb 2022 02:53:19 Message: <61fcdb6f\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#61fcdb6f%241%40news.povray.org",
"dateCreated": "2022-02-04T07:53:19+00:00",
"datePublished": "2022-02-04T07:53:19+00:00",
"author": {
"@type": "Person",
"name": "m@b"
}
}
On 04/02/2022 8:49 am, Cousin Ricky wrote:
> I don't know how Matthew did his,

Here are the bones of it:

// Starting points
#declare X0 = 0.001;
#declare Y0 = 0.001;

// Loop
#for(i, 0, 150, 0.01)

// Displacement - how fast the spiral expands
#declare D = i*0.003;

// Angle between steps
#declare A = i*100;

// Calculate position on the input image
#declare X = D*cosd(A);
#declare Y = D*sind(A);

// Get value from image
Colour_test()

// Draw a cylinder from previous point to current point
cylinder{<X0,Y0,0><X,Y,0>, 0.005*Brightness}

// Save current point for next iteration
#declare X0 = X;
#declare Y0 = Y;
#end
```
 From: Cousin Ricky Subject: Re: Spiral image macro Date: 12 Feb 2022 15:10:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.62081386650e9ef360e0cc3d949c357d%40news.povray.org",
"dateCreated": "2022-02-12T20:10:00+00:00",
"datePublished": "2022-02-12T20:10:00+00:00",
"author": {
"@type": "Person",
"name": "Cousin Ricky"
}
}
Cousin Ricky <ric### [at] yahoocom> wrote:
> I don't know how Matthew did his, but this is my take.

Doh!  "Square <0, 0, 0>...<1, 1, 1>" should be "Square <0, 0, 0>...<1, 1, 0>"!
```
 From: Cousin Ricky Subject: Re: Spiral image macro, version 2.0 Date: 13 Feb 2022 16:57:39 Message: <62097ed3@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#62097ed3%40news.povray.org",
"headline": "Re: Spiral image macro, version 2.0",
"dateCreated": "2022-02-13T21:57:39+00:00",
"datePublished": "2022-02-13T21:57:39+00:00",
"author": {
"@type": "Person",
"name": "Cousin Ricky"
}
}
On 2022-02-03 20:49 (-4), Cousin Ricky wrote:
> I don't know how Matthew did his, but this is my take.
>
> You will need SphereSweep from the Object Collection as a prerequisite.
> SphereSweep can be obtained at:
>   https://github.com/CousinRicky/POV-SphereSweep

I added some macros to compute sizes and scale the image map (pigment,
actually), and prepared it for the Object Collection when it comes back
online. It us currently hosted on GitHub:
https://github.com/CousinRicky/POV-SpiralImage
```