POV-Ray : Newsgroups : povray.text.scene-files : GlowString Macro Server Time
1 Nov 2024 09:23:13 EDT (-0400)
  GlowString Macro (Message 1 to 1 of 1)  
From: Andy Cocker
Subject: GlowString Macro
Date: 3 Dec 2000 07:15:47
Message: <3a2a3973@news.povray.org>
Hi,

Here's my little macro that I used to make the pic posted in p.b.i.

//Point1 = the start point
//Point2 = the destination point
//NumOfGlows = the number of glows in the string ( are you following this
//:-) )
//Glow_Intensity = the brightness of the glows.

#macro GlowString (Point1, Point2, NumOfGlows,Glow_Intensity)
#local DA=seed(7);
#local pos=Point2-Point1;
#local inc=pos/NumOfGlows;
#local i=0;
#while (i<=NumOfGlows)
         glow {location Point1+inc*i size 1 type 0
         color rgb <rand(DA),rand(DA),rand(DA)>*Glow_Intensity}
#local i=i+1;
#end
#end

//Then invoke the macro with:

GlowString (<-3,-3,-3>,<3,3,3>,24,0.0045)

Please make any alterations you want to this macro, but I'd appreciate it if
you let me see any improvements you make, as I'm still learning all about
macros.
Thanks.

All the best,

Andy Cocker


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.