POV-Ray : Newsgroups : povray.binaries.images : GlowString.jpg (26Kbu) Server Time
19 Oct 2026 11:37:37 EDT (-0400)
  GlowString.jpg (26Kbu) (Message 1 to 18 of 18)  
From: Andy Cocker
Subject: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 07:13:32
Message: <3a2a38ec@news.povray.org>
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


 

From: Yann Ramin
Subject: Re: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 12:55:21
Message: <3a2a8909@news.povray.org>
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] atrustrivalieeuorg
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

From: David Fontaine
Subject: Re: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 18:33:17
Message: <3A2AD79D.1C5989D9@faricy.net>
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] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: David Fontaine
Subject: Re: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 18:53:36
Message: <3A2ADC5F.45F91647@faricy.net>
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] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Andy Cocker
Subject: Re: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 20:58:15
Message: <3a2afa37@news.povray.org>
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

From: David Fontaine
Subject: Re: GlowString.jpg (26Kbu)
Date: 3 Dec 2000 22:17:29
Message: <3A2B0C23.34B006E0@faricy.net>
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] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Jérôme M  Berger
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 05:38:14
Message: <3A2B7416.9C046629@enst.fr>
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.

		Jérôme
-- 
********************************* Jérôme M. BERGER
* Abandon the search for truth, * mailto:ber### [at] inamecom
* Settle for a good fantasy.    * http://www.enst.fr/~jberger
*********************************


Post a reply to this message

From: Geoff Wedig
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 07:56:57
Message: <3a2b9499@news.povray.org>
Andy Cocker <big### [at] mariner9fsnetcouk> 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

From: Andy Cocker
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 13:24:19
Message: <3a2be153@news.povray.org>
"Geoff Wedig" <wed### [at] darwinepbicwruedu> 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

From: Matt Giwer
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 13:29:36
Message: <3A2BE291.C81167CF@ij.net>
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

From: Andy Cocker
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 13:39:44
Message: <3a2be4f0@news.povray.org>
"Matt Giwer" <jul### [at] ijnet> wrote in message
news:3A2BE291.C81167CF@ij.net...
> 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.

That's a good point Matt... I was wondering what these glows were reminding
me of, and it is Bladerunner.

Actually, somebody posted some code a while ago that reads in a bitmap
image, and rebuilds that image as an array of objects, each taking their
colour from the bitmap (I forget what the technique is called). I wonder if
this could be applied to an array of glows.. It would look fantastic if a
sequence of images were used as a source... like those huge video
billboards!

Andy Cocker


Post a reply to this message

From: Steve
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 16:32:41
Message: <slrn92o37o.gst.steve@zero-pps.localdomain>
On Mon, 4 Dec 2000 18:37:41 -0000, Andy Cocker wrote:

>Actually, somebody posted some code a while ago that reads in a bitmap
>image, and rebuilds that image as an array of objects, each taking their
>colour from the bitmap (I forget what the technique is called). I wonder if
>this could be applied to an array of glows.. It would look fantastic if a
>sequence of images were used as a source... like those huge video
>billboards!

You've got me thinking now: Can of Coke, Pretty girls face, A company logo,
Something in Chinese then back to the Coke again.

Of course the streets would have to be wet with rain, and I could use
my trafficlights macro, and have traffic going past etc. 

-- 
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

  8:34pm  up 54 days, 22:59,  2 users,  load average: 1.25, 1.15, 1.10


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 17:02:49
Message: <3A2C13FD.1905E192@online.no>
Andy Cocker wrote:
> 
>...
> Actually, somebody posted some code a while ago that reads in a bitmap
> image, and rebuilds that image as an array of objects, each taking their
> colour from the bitmap (I forget what the technique is called). I wonder if
> this could be applied to an array of glows.. It would look fantastic if a
> sequence of images were used as a source... like those huge video
> billboards!

Xplo Eristotle also suggested something like this in my 
"Fibonacci Stones" thread:

news://news.povray.org/39B5728A.54AE8936%40unforgettable.com


In my "Fibonacci Mosaics" thread:

news://news.povray.org/39B65D7C.9BE96D79%40online.no

the colouring of the blobs in these images are done 
according to the colours in another image.

I can post the code for it. (But you would probably 
want to do it the Mega-POV way :)


Tor Olav
-- 
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Chris Huff
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 21:24:23
Message: <chrishuff-BABEA5.21250704122000@news.povray.org>
In article <3a2be4f0@news.povray.org>, "Andy Cocker" 
<big### [at] mariner9fsnetcouk> wrote:

> I wonder if this could be applied to an array of glows.. It would 
> look fantastic if a sequence of images were used as a source... like 
> those huge video billboards!

Somebody has actually done this before...use eval_pigment() to get the 
color of an image_map at the position of each glow.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 21:26:30
Message: <chrishuff-52438B.21271404122000@news.povray.org>
In article <3a2a38ec@news.povray.org>, "Andy Cocker" 
<big### [at] mariner9fsnetcouk> wrote:

> For example, is there a better way of doing it than using a #while()
> loop?

I don't know what you intend...this is exactly what #while loops were 
created for, the other ways would be recursing macros(unnecesarily 
inefficient, limited, and slow for just making a straight line), and 
doing it by hand. #while loops are the best way to do it.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: David Fontaine
Subject: Re: GlowString.jpg (26Kbu)
Date: 4 Dec 2000 23:03:41
Message: <3A2C6874.91B7CC4D@faricy.net>
Chris Huff wrote:

> > For example, is there a better way of doing it than using a #while()
> > loop?
>
> I don't know what you intend...this is exactly what #while loops were
> created for, the other ways would be recursing macros(unnecesarily
> inefficient, limited, and slow for just making a straight line), and
> doing it by hand. #while loops are the best way to do it.

Nah, #for loops are ;)

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Alan Holding
Subject: Re: GlowString.jpg (26Kbu)
Date: 5 Dec 2000 18:06:30
Message: <3a2d74f6@news.povray.org>
"Andy Cocker" <big### [at] mariner9fsnetcouk> wrote in message
news:3a2be4f0@news.povray.org...

> Actually, somebody posted some code a while ago that reads in a bitmap
> image, and rebuilds that image as an array of objects, each taking their
> colour from the bitmap (I forget what the technique is called). I wonder
if
> this could be applied to an array of glows.. It would look fantastic if a
> sequence of images were used as a source... like those huge video
> billboards!

That might have been me and the POV glow logo thing I did.  The code is
still in p.b.s-f under 'Glow Logo zip' or something similar.  But!  I did it
in a very kludgy fashion that I wouldn't recommend you repeating.  Me no
code demon either...

Bye.


Post a reply to this message

From: Chris Huff
Subject: Re: GlowString.jpg (26Kbu)
Date: 6 Dec 2000 05:39:59
Message: <chrishuff-89628F.05404506122000@news.povray.org>
In article <3A2C6874.91B7CC4D@faricy.net>, David Fontaine 
<dav### [at] faricynet> wrote:

> Nah, #for loops are ;)

How can #for loops be the best way to do things if you have to write the 
patch first? :-)
I agree that they would be a good idea, and if they did exist, they 
would be the best way to do it...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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