![](/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) |
Hi,
I just wrote my first macro, and although it's probably incredibly simple to
most of you, I'm still quite pleased.
The macro simply places a number of glows equally spaced between two points.
It would be improved if the glowstring could be made 'slack', so that it
dropped in the middle as though affected by gravity, but I have absolutely
no idea how to do something like that.
Anyway, I've posted my little macro in p.t.s.f, called GlowSting Macro. If
anyone wants to improve it, I'd be interested in seeing what changes you
make. For example, is there a better way of doing it than using a #while()
loop?
Ok, here's a pic I made using the macro:
Post a reply to this message
Attachments:
Download 'GlowString.jpg' (27 KB)
Preview of image 'GlowString.jpg'
![GlowString.jpg](/povray.binaries.images/attachment/%3C3a2a38ec%40news.povray.org%3E/GlowString.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) |
Andy Cocker wrote:
Looks...bright :) Thats hurting my eyes
> The macro simply places a number of glows equally spaced between two
> points. It would be improved if the glowstring could be made 'slack', so
> that it dropped in the middle as though affected by gravity, but I have
> absolutely no idea how to do something like that.
Take a look at the MakeTree macro - it allows the tree to be "pushed" and
"pulled" by a gravity vector. It looks like what you want is a severly
compressed quadratic (1/200x^2), let x run bewteen one end, to zero, then
to the other end. The equation will then produce the right y coordinate.
You could get fancy, define a zero point and all too (+ a second
compression ratio for the other end ;)) (that would be useful in
animations, a rippling whip or rope).
Anyway, enough of this :)
Looks great!
Yann
>
> Anyway, I've posted my little macro in p.t.s.f, called GlowSting Macro. If
> anyone wants to improve it, I'd be interested in seeing what changes you
> make. For example, is there a better way of doing it than using a #while()
> loop?
>
> Ok, here's a pic I made using the macro:
>
>
--
--------------------------------------------------------------------
Yann Ramin atr### [at] atrustrivalie eu org
Atrus Trivalie Productions www.redshift.com/~yramin
AIM oddatrus
Marina, CA http://profiles.yahoo.com/theatrus
IRM Developer Network Toaster Developer
SNTS Developer KLevel Developer
Electronics Hobbyist person who loves toys
Build a man a fire, and he's warm for a day.
Set a man on fire, and he'll be warm for the rest of his life.
"I'm prepared for all emergencies but totally unprepared for everyday
life."
--------------------------------------------------------------------
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) |
Andy Cocker wrote:
> The macro simply places a number of glows equally spaced between two points.
> It would be improved if the glowstring could be made 'slack', so that it
> dropped in the middle as though affected by gravity, but I have absolutely
> no idea how to do something like that.
That would be a parabola (actually, a catenoid, but parabola suffices and
mathworld.wolfram.com is down).
To find arc length is difficult...
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
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) |
David Fontaine wrote:
> That would be a parabola (actually, a catenoid, but parabola suffices and
> mathworld.wolfram.com is down).
>
> To find arc length is difficult...
1) Find parametric equations for the parabola
xt = t
yt = at^2 + bt + c
2) Differentiate these equations
x't = 1
y't = 2at + b
3) Use pythagorean theorem to find how fast (x,y) is moving with respect to t
sqrt(4a^2t^2 + 4abt + b^2 + 1)
4) Integrate to get an equation for arc length
It helps to have values of a, b and c before you start...
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
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) |
Thankyou both for your replies, but I'm not ashamed to admit that both your
answers are *way* beyond me and my mathematical capabilities :-). As I said,
this is my first macro, and I'm not really sure how to progress from here. I
*really* wish that I could write such a macro though... glows would be
wonderful in conjunction with code that allows them to be strung loosely
between two points... ideal for this time of year and Xmas scenes.
Thanks again,
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) |
|
![](/i/fill.gif) |
Andy Cocker wrote:
> Thankyou both for your replies, but I'm not ashamed to admit that both your
> answers are *way* beyond me and my mathematical capabilities :-). As I said,
> this is my first macro, and I'm not really sure how to progress from here. I
> *really* wish that I could write such a macro though... glows would be
> wonderful in conjunction with code that allows them to be strung loosely
> between two points... ideal for this time of year and Xmas scenes.
Well, I can get as far as the integral equation, but solving it is tricky... :)
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
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) |
Andy Cocker wrote:
>
> Thankyou both for your replies, but I'm not ashamed to admit that both your
> answers are *way* beyond me and my mathematical capabilities :-). As I said,
> this is my first macro, and I'm not really sure how to progress from here. I
> *really* wish that I could write such a macro though... glows would be
> wonderful in conjunction with code that allows them to be strung loosely
> between two points... ideal for this time of year and Xmas scenes.
>
Well, you could always get a look at C. Colefax's chain macros. They
should provide a good starting point.
--
* Abandon the search for truth, * mailto:ber### [at] iname com
* Settle for a good fantasy. * http://www.enst.fr/~jberger
*********************************
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) |
Andy Cocker <big### [at] mariner9 fsnet co uk> wrote:
> Hi,
> I just wrote my first macro, and although it's probably incredibly simple to
> most of you, I'm still quite pleased.
> The macro simply places a number of glows equally spaced between two points.
> It would be improved if the glowstring could be made 'slack', so that it
> dropped in the middle as though affected by gravity, but I have absolutely
> no idea how to do something like that.
> Anyway, I've posted my little macro in p.t.s.f, called GlowSting Macro. If
> anyone wants to improve it, I'd be interested in seeing what changes you
> make. For example, is there a better way of doing it than using a #while()
> loop?
Well, if you want, I've got a macro that uses the hyperbolic functions to do
the drop, which I used for the rope in my IRTC image from the SEA
competition. It calculates the appropriate points given a 'lowest' point on
the hyperbola, and returns a vector of them. There is another macro out
there for doing this, but IIRC, it uses a parabola, which isn't realistic in
some cases, though a good approximation.
Geoff
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) |
"Geoff Wedig" <wed### [at] darwin epbi cwru edu> wrote in message
news:3a2b9499@news.povray.org...
> Well, if you want, I've got a macro that uses the hyperbolic functions to
do
> the drop, which I used for the rope in my IRTC image from the SEA
> competition. It calculates the appropriate points given a 'lowest' point
on
> the hyperbola, and returns a vector of them. There is another macro out
> there for doing this, but IIRC, it uses a parabola, which isn't realistic
in
> some cases, though a good approximation.
Yes Geoff, I would be interested in having a look at your macro, though I'm
not sure if I'll be able to understand it (my concentration is very poor).
Please either post it on the server, or mail it to me direct.
Thanks,
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) |
|
![](/i/fill.gif) |
Andy Cocker wrote:
That looks like a great candidate for the kind of street advertising
graphics as in Bladerunner. The typeface has to change but the overall
effect is quite impressive.
--
If evolution has a direction
why don't squirrels have keyboards?
-- The Iron Webmaster, 290
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) |