POV-Ray : Newsgroups : povray.general : Parabolic looping macro Server Time
29 Nov 2024 17:55:49 EST (-0500)
  Parabolic looping macro (Message 1 to 6 of 6)  
From: Bryan Valencia
Subject: Parabolic looping macro
Date: 26 Jul 2005 19:30:15
Message: <42e6c787@news.povray.org>
I'd like to find a parabolic looping macro, where I can give 2 endpoints and
a "stretched" length.  maybe something like this:


#macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)


...where P1 and P2 are the endpoints, StretchedLength is how much "string"
there is, and the "segments" would be spaced evenly along the spline like
the links of a chain.


This leads me to my next question.  Is there a repository of super-cool POV
macros?


Post a reply to this message

From: PM 2Ring
Subject: Re: Parabolic looping macro
Date: 26 Jul 2005 20:35:01
Message: <web.42e6d5abbdadf4adad93754b0@news.povray.org>
"Bryan Valencia" <pov### [at] spamgourmetcom> wrote:
> I'd like to find a parabolic looping macro, where I can give 2 endpoints and
> a "stretched" length.  maybe something like this:
>
>
> #macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)
>
>
> ...where P1 and P2 are the endpoints, StretchedLength is how much "string"
> there is, and the "segments" would be spaced evenly along the spline like
> the links of a chain.

If you're making a chain, you need a catenary, not a parabola. A nice macro
for this was posted a few months back. If I get the time, I'll try
searching for it.

>
>
> This leads me to my next question.  Is there a repository of super-cool POV
> macros?

Yes. :)


Post a reply to this message

From: PM 2Ring
Subject: Re: Parabolic looping macro
Date: 26 Jul 2005 21:05:01
Message: <web.42e6dc9abdadf4adad93754b0@news.povray.org>
"Bryan Valencia" <pov### [at] spamgourmetcom> wrote:
> I'd like to find a parabolic looping macro, where I can give 2 endpoints and
> a "stretched" length.  maybe something like this:
>
>
> #macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)
>
>
> ...where P1 and P2 are the endpoints, StretchedLength is how much "string"
> there is, and the "segments" would be spaced evenly along the spline like
> the links of a chain.
>
>
> This leads me to my next question.  Is there a repository of super-cool POV
> macros?

See Chris Colefax's page:
http://www.geocities.com/SiliconValley/Lakes/1434/#IncludeFiles

See his link.inc file
http://www.geocities.com/SiliconValley/Lakes/1434/download/link.zip

Have fun!


Post a reply to this message

From: Bonsai
Subject: Re: Parabolic looping macro
Date: 27 Jul 2005 03:41:15
Message: <42e73a9b$1@news.povray.org>
Bryan Valencia wrote:
> I'd like to find a parabolic looping macro, where I can give 2 endpoints and
> a "stretched" length.  maybe something like this:
>  
> #macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)
>  
> ...where P1 and P2 are the endpoints, StretchedLength is how much "string"
> there is, and the "segments" would be spaced evenly along the spline like
> the links of a chain.

Maybe you can reuse the math behind my arch macro:

http://www.b0n541.net/povray/povmacro.html

Just my two eurocents,

Bonsai

-- 
<--------------------------->
    ___ __ __  _ ___ ___  _
   | _ )  \  \( )  _) _ )( )
   | _ \() |\ \ |\ \/ _ \| |
   |___/__/_)\__)___)/ \_)_)

        www.b0n541.net
<--------------------------->


Post a reply to this message

From: PM 2Ring
Subject: Re: Parabolic looping macro
Date: 1 Aug 2005 03:45:00
Message: <web.42edd1efbdadf4adad93754b0@news.povray.org>
"Bryan Valencia" <pov### [at] spamgourmetcom> wrote:
> I'd like to find a parabolic looping macro, where I can give 2 endpoints and
> a "stretched" length.  maybe something like this:
>
>
> #macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)
>
>
> ...where P1 and P2 are the endpoints, StretchedLength is how much "string"
> there is, and the "segments" would be spaced evenly along the spline like
> the links of a chain.
>
>
> This leads me to my next question.  Is there a repository of super-cool POV
> macros?

Actually, the Links.inc file by Chris Colefax uses parabolas. The macro from
a few months back was written by Mike Williams. It does use cosh(), but it
is mathematically incorrect. Also, it uses sphere_sweep to make smooth
cables, rather than chains.

I've spent the weekend creating a mathematically correct Chain-making macro.
I'll post preliminary results tonight, if I get the time.


Post a reply to this message

From: PM 2Ring
Subject: Re: Parabolic looping macro
Date: 1 Aug 2005 05:50:00
Message: <web.42edef15bdadf4ad9143b5c90@news.povray.org>
"Bryan Valencia" <pov### [at] spamgourmetcom> wrote:
> I'd like to find a parabolic looping macro, where I can give 2 endpoints and
> a "stretched" length.  maybe something like this:
>
>
> #macro loop(P1, P2, Stretched, SegmentCount, SegmentObject)
>
>
> ...where P1 and P2 are the endpoints, StretchedLength is how much "string"
> there is, and the "segments" would be spaced evenly along the spline like
> the links of a chain.

Ok, Bryan. I'm posting a draft version of my Chain macro and a short test
scene in binary.images, under subject "True catenary". Rather than
specifying the Streteched length, you specify a Slack factor, which is just
the string length divided by the direct distance between P1 & P2. It
calculates the SegmentCount itself (and segment length) itself.

Have a play with it, I'd love to hear any feedback & suggestions.


Post a reply to this message

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