POV-Ray : Newsgroups : povray.binaries.images : GlowString.jpg (26Kbu) Server Time
19 Aug 2024 14:16:04 EDT (-0400)
  GlowString.jpg (26Kbu) (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
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.


-- 

* 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

Goto Latest 10 Messages Next 8 Messages >>>

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