![](/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) |
Hello, all.
This will all link up in a minute...
A while ago, Chris Colefax was very kind in supplying me with a MegaPOV
compatible version of his Spline Macro File.
After reading Andy Cocker's recent posts about trying to write a macro which
could do 'glows on a string', I tried to see if I could use Chris's macro to
come up with a solution. And I think I have, as the attached image shows.
For those unfamiliar with the Spline Macro, apologies for the next bit.
To make the image, I defined a glow as a spline_object like this...
#macro spline_object ()
glow {type 1 location sPos colour rgb
<1.35-(sProgress*1.5),0.5,sProgress> size 0.01}
#end
...the important bit being the 'location sPos' part, which gets around the
fact that glows can't be transformed as the Spline Macro defines where the
glow should go in the 'chain' via the sPos variable.
Next, I defined a spline for the glows to follow...
#local glow_spline=create_spline (
array[4] {<-40,0,0>,<-10,50,0>,<30,-80,0>,<40,20,0>},
create_bezier_spline + spline_tension (0.4) + spline_sampling (on) +
spline_loop (no)
)
...and finally called the finished spline:
create_spline_object (glow_spline, spline_steps (40) + spline_radius (0.1))
Bingo. Glows on a chain.
I'd post the code in p.t.s-f, but I don't think Chris has made the MegaPOV
version of his Spline Macro publically available yet.
Chris? Am I OK to post it?
Bye,
Alan.
Post a reply to this message
Attachments:
Download 'glow_spline.jpg' (11 KB)
Preview of image 'glow_spline.jpg'
![glow_spline.jpg](/povray.binaries.images/attachment/%3C3a2d86db%40news.povray.org%3E/glow_spline.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Alan Holding
Subject: Re: Glow splines - Attn Andy Cocker, et al
Date: 5 Dec 2000 20:36:35
Message: <3a2d9823@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Forgot to mention that it also works OK if you define the spline_object ()
as a light_source...
#macro spline_object ()
light_source {sPos rgb <whatever> glow {type 0 size 0.4}}
#end
...as in the attached image.
Bye,
Alan.
Post a reply to this message
Attachments:
Download 'glows_spline2.jpg' (9 KB)
Preview of image 'glows_spline2.jpg'
![glows_spline2.jpg](/povray.binaries.images/attachment/%3C3a2d9823%40news.povray.org%3E/glows_spline2.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) |
In article <3a2d86db@news.povray.org>, "Alan Holding"
<man### [at] lineone net> wrote:
> After reading Andy Cocker's recent posts about trying to write a
> macro which could do 'glows on a string', I tried to see if I could
> use Chris's macro to come up with a solution. And I think I have, as
> the attached image shows.
Why use the macro when splines are available as a built-in feature? Are
there some special features it has?
> Chris? Am I OK to post it?
Which Chris? ;-)
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
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) |
Chris Huff <chr### [at] mac com> wrote:
: Why use the macro when splines are available as a built-in feature? Are
: there some special features it has?
Can the built-in spline place the points evenly along the curve?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Chris Colefax
Subject: Re: Glow splines - Attn Andy Cocker, et al
Date: 6 Dec 2000 07:51:12
Message: <3a2e3640@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Alan Holding <man### [at] lineone net> wrote:
[snip]
> I'd post the code in p.t.s-f, but I don't think Chris has made the MegaPOV
> version of his Spline Macro publically available yet.
>
> Chris? Am I OK to post it?
By all means, post the SplineMP.mcr file I sent you if it's needed for what
you wish to do (and allow others to do)...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Chris Colefax
Subject: Re: Glow splines - Attn Andy Cocker, et al
Date: 6 Dec 2000 07:51:18
Message: <3a2e3646@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> wrote:
> Why use the macro when splines are available as a built-in feature? Are
> there some special features it has?
In a word, Yes. I knew spline functions were available in POV patches when
I was working on my Spline macro file, and I expected that these would find
their way into a future official version of POV-Ray. Because of this, I
didn't want to spend my time creating something that would very quickly
become obsolete (after all, I already had a spline include file that seemed
to serve people quite well).
As a result, simply calculating splines positions given a list of points is
the very least the file does. Firstly, it offers the ability to create all
the cubic interpolating splines, from Catmull-Rom to cardinal right through
to Kochanek-Bartels (TCB) splines, as well as hermite and Bezier splines.
This gives much more control over the shape of the spline, and allows you to
explore all sorts of curves that may pass through a single set of points
(see the first page of the Spline Macro tutorial at
http://www.geocities.com/ccolefax/spline).
Also, as Warp mentioned, it includes a full set of sampling functions so you
can find the length of splines, create splines tensioned to fit a specified
length, and returns points evenly spaced along a spline. It also includes a
caching function to speed up the usage of sampled splines.
On top of that, the system includes a set of macros that fully automate the
use of splines for animation and object creation, which can be customised
partly or completely. Alan has used various features (the Bezier spline,
tensioning, sampling, custom object creation macros), and while it's true
similar results could have been achieved using the internal spline function,
to have things like the evenly distributed glows would entail recreating
much of what my macro file already does!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Alan Holding
Subject: Re: Glow splines - Attn Andy Cocker, et al
Date: 6 Dec 2000 13:41:19
Message: <3a2e884f@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Chris Colefax" <chr### [at] tag povray org> wrote in message
news:3a2e3640@news.povray.org...
>
> By all means, post the SplineMP.mcr file I sent you if it's needed for
what
> you wish to do (and allow others to do)...
>
OK. I'll post it to povray.binaries.scene-files.
Fank yew.
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) |
In article <3a2e2170@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Can the built-in spline place the points evenly along the curve?
Not on it's own, you would have to write the code to do that
yourself(which shouldn't be too hard...) However, that's an interesting
idea for a new spline feature...you could just add "constant_speed" or
something to get that result.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
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) |
Chris Huff <chr### [at] mac com> wrote:
: Not on it's own, you would have to write the code to do that
: yourself(which shouldn't be too hard...) However, that's an interesting
: idea for a new spline feature...you could just add "constant_speed" or
: something to get that result.
Why, when there's already a macro for doing that?
Why double the effort?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Andy Cocker
Subject: Re: Glow splines - Attn Andy Cocker, et al
Date: 7 Dec 2000 15:17:11
Message: <3a2ff047@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Alan,
Thanks very much. This looks great.
All the best,
Andy Cocker
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) |