|
|
In article <39616a2c@news.povray.org>, "Bob Hughes"
<per### [at] aolcom?subject=PoV-News:> wrote:
> "Bill DeWitt" <the### [at] earthlinknet> wrote in message
> news:39610dc0@news.povray.org...
> | "Chris Huff" <chr### [at] maccom> wrote :
> | >
> | > Why not just use something like this instead:
> | >
> | > translate vrotate(z, y*turns*360)*< RADIUSX, 0, RADIUSZ>
> |
> | Because I never did figure out vrotate.
> |
> | But I will not let that stop me from -using- what -you- figured out
> | 8-)
>
> I'm not much with that kind of thing myself, I did try to replace the
> original way in your pov script with the vrotate and it didn't work
> out too well. Or it least the obvious didn't work out. Unending
> learning process.
Try this rewritten version, I neglected to include the counter variable:
#declare Animation = off;
#macro CircleCoil(RadiusMinor, TurnsMinor, RadiusMajor, TurnsMajor,
Parts)
#if(Animation=on)
// must have at least one component in blob
#local StopVal = Parts*clock + 1;
#else
#local StopVal = Parts;
#end
blob {
#local I=0;
#while(I < StopVal)
//////////// Sphere ////////////
sphere {< 0, 0, 0>, 0.5, strength 2
scale < 0.5, 50/Parts, 0.5 >
translate vrotate(z,
y*(I/(Parts-1))*TurnsMinor*360)*RadiusMinor
rotate < 0, 0, 90-((I/(Parts-1))*360)>
translate
vrotate(y,-z*(I/(Parts-1))*TurnsMajor*360)*RadiusMajor
}
#local I = I+1;
#end
}// end blob
#end// end CircleCoil
object {CircleCoil(< 0.25, 0, 0.25>, 8, < 1.25, 1.25, 0>, 1, 1000)
rotate < 90, 0, 0>
texture {
pigment {color rgb < 0.7, 0.8, 0.9>}
finish {
ambient 0.125
//reflection 0.95
}
}
translate y*0.5
} // end object
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|