![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've posted information about this image in povray general.
I'm requesting some help for creating a small object. I want to basically
wrap a rounded spiral around a sphere.
Patrick Dugan
Post a reply to this message
Attachments:
Download 'SpiralSphere.jpg' (11 KB)
Preview of image 'SpiralSphere.jpg'
![SpiralSphere.jpg](/povray.binaries.images/attachment/%3C3c5dcaf2%40news.povray.org%3E/SpiralSphere.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This is probably the simplest way
Just start at the top
Put an object at <cos(pi/2)*radius, sin(pi/2)*radius, 0>
Incremently increase your angle from pi/2 to 3*pi/4
each time you place an object, rotate it a little bit around the y-axis
Hope this helps,
-Shay
"Patrick Dugan" <pat### [at] netins net> wrote in message
news:3c5dcaf2@news.povray.org...
> I've posted information about this image in povray general.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Well I probably butchered the formula but here is what I made:
#declare MinRad = pi/2;
#declare MaxRad = (3*pi/4)*10;
#declare Test =
union {
#while (MinRad < MaxRad)
object {sphere {<0,0,0>, 0.1 translate <cos(MinRad)*1, sin(MinRad)*1,
MinRad/10> pigment {Red}}}
#declare MinRad = MinRad + 0.01;
#end
}
object {Test rotate x * -90 translate <0,-2,0>}
This created a spiral but always the same distance from the center. I was
trying to make something that would get closer to the center as it moved up
or down.
What did I do wrong? (I'm sorry my math skills are really poor...)
"Shay" <shi### [at] houston rr com> wrote in message
news:3c5dcd84@news.povray.org...
>
> This is probably the simplest way
> Just start at the top
> Put an object at <cos(pi/2)*radius, sin(pi/2)*radius, 0>
> Incremently increase your angle from pi/2 to 3*pi/4
> each time you place an object, rotate it a little bit around the y-axis
>
> Hope this helps,
> -Shay
>
>
> "Patrick Dugan" <pat### [at] netins net> wrote in message
> news:3c5dcaf2@news.povray.org...
> > I've posted information about this image in povray general.
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'm sorry. 3*pi/4 should have been 3*pi/2
You don't need to translate the spiral any along the y-axis. Setting x and y
to the cos and sin of the angle will do that for you.
The formula itself zill make a half-moon arc. Rotating each sphere some will
give you the twist.
Like this:
#declare MinRad = pi/2;
#declare MaxRad = (3*pi/2);
#declare Test =
union {
#while (MinRad < MaxRad)
object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1, sin(MinRad)*1,
0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
#declare MinRad = MinRad + 0.0001;
#end
}
object {Test /*rotate x * -90 translate <0,-2,0>*/}
#declare MinRad = pi/2;
#declare MaxRad = (3*pi/2);
#declare Test =
union {
#while (MinRad < MaxRad)
object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1, sin(MinRad)*1,
0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
#declare MinRad = MinRad + 0.0001;
#end
}
object {Test /*rotate x * -90 translate <0,-2,0>*/}
"Patrick Dugan" <pat### [at] netins net> wrote in message
news:3c5dddaf$1@news.povray.org...
> Well I probably butchered the formula but here is what I made:
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Patrick Dugan
Subject: Re: Spiral wrapped around a sphere. How?
Date: 3 Feb 2002 20:29:36
Message: <3c5de400@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
That is perfect!!
Thank you!
"Shay" <shi### [at] houston rr com> wrote in message
news:3c5de13b$1@news.povray.org...
> I'm sorry. 3*pi/4 should have been 3*pi/2
> You don't need to translate the spiral any along the y-axis. Setting x and
y
> to the cos and sin of the angle will do that for you.
> The formula itself zill make a half-moon arc. Rotating each sphere some
will
> give you the twist.
> Like this:
> #declare MinRad = pi/2;
> #declare MaxRad = (3*pi/2);
> #declare Test =
> union {
> #while (MinRad < MaxRad)
> object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1,
sin(MinRad)*1,
> 0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
> #declare MinRad = MinRad + 0.0001;
> #end
> }
>
> object {Test /*rotate x * -90 translate <0,-2,0>*/}
>
> #declare MinRad = pi/2;
> #declare MaxRad = (3*pi/2);
> #declare Test =
> union {
> #while (MinRad < MaxRad)
> object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1,
sin(MinRad)*1,
> 0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
> #declare MinRad = MinRad + 0.0001;
> #end
> }
>
> object {Test /*rotate x * -90 translate <0,-2,0>*/}
> "Patrick Dugan" <pat### [at] netins net> wrote in message
> news:3c5dddaf$1@news.povray.org...
> > Well I probably butchered the formula but here is what I made:
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Shay wrote:
>
> I'm sorry. 3*pi/4 should have been 3*pi/2
> You don't need to translate the spiral any along the y-axis. Setting x and y
> to the cos and sin of the angle will do that for you.
> The formula itself zill make a half-moon arc. Rotating each sphere some will
> give you the twist.
> Like this:
> #declare MinRad = pi/2;
> #declare MaxRad = (3*pi/2);
> #declare Test =
> union {
> #while (MinRad < MaxRad)
> object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1, sin(MinRad)*1,
> 0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
> #declare MinRad = MinRad + 0.0001;
> #end
> }
>
> object {Test /*rotate x * -90 translate <0,-2,0>*/}
>
> #declare MinRad = pi/2;
> #declare MaxRad = (3*pi/2);
> #declare Test =
> union {
> #while (MinRad < MaxRad)
> object {sphere {<0,0,0>, 0.01 translate <cos(MinRad)*1, sin(MinRad)*1,
> 0> rotate y*degrees(MinRad)*20 pigment {rgb <1,0,0>}}}
> #declare MinRad = MinRad + 0.0001;
> #end
> }
Also try this:
#declare SphereRadius = 1.5;
#declare SpiralRadius = 0.05;
#declare NrOfTurns = 5;
#declare NrOfSpheres = 1000;
#declare dAngle = 180/NrOfSpheres;
#declare SphereSpiral =
union {
#declare Cnt = 0;
#while (Cnt < NrOfSpheres)
sphere {
-SphereRadius*y, SpiralRadius
rotate Cnt*dAngle*<1, 2*NrOfTurns, 0>
}
#declare Cnt = Cnt + 1;
#end // while
}
object {
SphereSpiral
pigment { color rgb <1, 1, 1> }
}
light_source { <-2, 2, -3>*10 color rgb <1, 1, 1> }
camera {
location <0, 1, -2>*2
look_at <0, 0, 0>
}
Tor Olav
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |