|
|
"SharkD" <mik### [at] gmailcom> wrote in message
news:4b04ad2d$1@news.povray.org...
> On 11/18/2009 10:51 AM, Captain Jack wrote:
>> I put a copy of the rendering up at YouTube, here:
>> http://www.youtube.com/watch?v=LzgV8dALdIo.
>
> Cool. I've been using it to render illustrations in POV-Ray, and then
> create markers and text on top of it in GeoGebra.
>
> Mike
And, just for the sake of completeness if anyone else is reading this, I
fixed the spring macro, using a macro from transforms.inc:
#macro Spring(Base_Point, Top_Point, Spring_Radius, Turns, Wire_Radius,
Length_Scale)
#local Length = vlength(Top_Point - Base_Point);
#local Points = 4*Turns + 3;
#local Arm_Delta = (Length/Length_Scale) / (4*Turns);
#local Arm_Offset = -Arm_Delta;
#local Arm_Rotation = 0;
sphere_sweep {
b_spline
Points
#local Counter = 0;
#while (Counter < Points)
, vrotate(Spring_Radius*x, Arm_Rotation*y) + Arm_Offset*y,
Wire_Radius
#local Arm_Offset = Arm_Offset + Arm_Delta;
#local Arm_Rotation = mod(Arm_Rotation + 90, 360);
#local Counter = Counter + 1;
#end
scale Length_Scale*y + (x + z)
Point_At_Trans(Top_Point - Base_Point)
translate Base_Point
bounded_by {
cylinder {
-Wire_Radius*y,
(Length+Wire_Radius)*y,
Spring_Radius+Wire_Radius
Point_At_Trans(Top_Point - Base_Point)
translate Base_Point
}
}
}
#end
Post a reply to this message
|
|