POV-Ray : Newsgroups : povray.binaries.images : Rope Macro Server Time
5 Nov 2024 09:22:05 EST (-0500)
  Rope Macro (Message 1 to 10 of 23)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Chris B
Subject: Rope Macro
Date: 28 May 2009 06:29:50
Message: <4a1e679e@news.povray.org>
I'm working on a new Rope macro to handle knots and track object surfaces 
etc.
Here are a couple of sample images.

Thoughts/ideas welcome.

Regards,
Chris B.


Post a reply to this message


Attachments:
Download 'rope_40.jpg' (78 KB) Download 'rope_41.jpg' (167 KB)

Preview of image 'rope_40.jpg'
rope_40.jpg

Preview of image 'rope_41.jpg'
rope_41.jpg


 

From: Bill Pragnell
Subject: Re: Rope Macro
Date: 28 May 2009 07:30:00
Message: <web.4a1e750b99a5bfb66dd25f0b0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> I'm working on a new Rope macro to handle knots and track object surfaces
> etc.
> Here are a couple of sample images.
>
> Thoughts/ideas welcome.

Looks awesome... this'll come in very handy.

How are you doing the knots, with predefined knot curves? And can you handle
e.g. coiling automatically? And presumably you're using either catenaries or a
full mechanics simulation to produce hanging curves...?

(And, and, and...)

:-)


Post a reply to this message

From: Chris B
Subject: Re: Rope Macro
Date: 28 May 2009 08:08:40
Message: <4a1e7ec8@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote in message 
news:web.4a1e750b99a5bfb66dd25f0b0@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> I'm working on a new Rope macro ...
>
> How are you doing the knots, with predefined knot curves?

Each knot has it's own little macro that tracks displacements through the 
path of the knot, factoring in the thickness of the rope and the tightness 
of the knot. The knot macros add points into an array which is built up to 
define the total path of the rope, then there's another macro to convert the 
array of points into one or more splines and the splines into the rope. 
Because you can break a rope into separate splines you can build adjacent 
segments of the same rope using different spline types.

> And can you handle e.g. coiling automatically?

There's a macro to add rope spirals with a configurable amount of 
randomness. It'll do left or right handed spirals, so it should be quite 
easy to add a coil of rope. I'll give that a go :o).

> And presumably you're using either catenaries or a
> full mechanics simulation to produce hanging curves...?

Ahh! Nothing nearly so sophisticated there I'm afraid :-). I have a loose 
segment macro that takes the current point and a new point and adds an extra 
point in between roughly in the right place to bring the rope length to 
approximately the value specified as a parameter and to get the lowest point 
roughly where it should be for the relative heights of the two end points. 
Then it relies upon using a curved spline for that segment of rope to join 
the dots in a fairly gravity compliant way. There's nothing stopping anyone 
with a better grip on the maths adding such a macro though. Each of the 
path-defining macros is quite short, so it doesn't take long to add new 
shape macros.

Regards,
Chris B.


Post a reply to this message


Attachments:
Download 'rope_14.jpg' (10 KB) Download 'rope_15.jpg' (18 KB)

Preview of image 'rope_14.jpg'
rope_14.jpg

Preview of image 'rope_15.jpg'
rope_15.jpg


 

From: Thomas de Groot
Subject: Re: Rope Macro
Date: 28 May 2009 10:14:11
Message: <4a1e9c33$1@news.povray.org>
"Chris B" <nom### [at] nomailcom> schreef in bericht 
news:4a1e7ec8@news.povray.org...
>> And presumably you're using either catenaries or a
>> full mechanics simulation to produce hanging curves...?
>
> Ahh! Nothing nearly so sophisticated there I'm afraid :-). I have a loose
> segment macro that takes the current point and a new point and adds an 
> extra
> point in between roughly in the right place to bring the rope length to
> approximately the value specified as a parameter and to get the lowest 
> point
> roughly where it should be for the relative heights of the two end points.
> Then it relies upon using a curved spline for that segment of rope to join
> the dots in a fairly gravity compliant way. There's nothing stopping 
> anyone
> with a better grip on the maths adding such a macro though. Each of the
> path-defining macros is quite short, so it doesn't take long to add new
> shape macros.
>


Yum yum... for the ropes and knots....  :-)
For catenaries, there is a set of macros by PM2Ring (2005) which do a better 
job than the catenaries by Chris Colefax. There is also a set of macros by 
Rob Antonishen (2002) but they do not work quite well I am afraid (last 
timeI tried them, earlier this year). Both sets were made available in these 
forums at the time.

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rope Macro
Date: 28 May 2009 10:32:26
Message: <4a1ea07a@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> schreef in bericht 
news:4a1e9c33> For catenaries, there is a set of macros by PM2Ring (2005) 
which do a better
> job than the catenaries by Chris Colefax. There is also a set of macros by 
> Rob Antonishen (2002) but they do not work quite well I am afraid (last 
> timeI tried them, earlier this year). Both sets were made available in 
> these forums at the time.


Found the PM 2Ring Catenary macro in povray.binaries.scene-files and in 
povray.text.scene-files: "Catenary - a chain making macro" 2 September 2005

I am unable to trace Rob Antonishen's macro.

Thomas


Post a reply to this message

From: clipka
Subject: Re: Rope Macro
Date: 28 May 2009 12:30:00
Message: <web.4a1ebbf399a5bfb6f708085d0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> >> I'm working on a new Rope macro ...

Now *this* looks good...!


Post a reply to this message

From: Jim Charter
Subject: Re: Rope Macro
Date: 28 May 2009 18:43:38
Message: <4a1f139a$1@news.povray.org>
> Thoughts/ideas welcome.
> 

Wow!


Post a reply to this message

From: Chris B
Subject: Re: Rope Macro
Date: 29 May 2009 11:52:08
Message: <4a2004a8@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote in message 
news:web.4a1e750b99a5bfb66dd25f0b0@news.povray.org...
>
> ... can you handle e.g. coiling automatically?
>

I've added a bit more into the spiral macro. What d'you have in mind by 
coiling 'automatically'?
The example below uses two calls to the macro. The first adds a little helix 
of two coils in the middle, spiralling downwards, the second call adds the 
outward spiral (both using the default amount of randomness).

Regards,
Chris B.


Post a reply to this message


Attachments:
Download 'rope_17.jpg' (16 KB)

Preview of image 'rope_17.jpg'
rope_17.jpg


 

From: Chris B
Subject: Re: Rope Macro
Date: 2 Jun 2009 14:02:14
Message: <4a256926@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message 
news:4a1e9c33$1@news.povray.org...
>
> "Chris B" <nom### [at] nomailcom> schreef in bericht 
> news:4a1e7ec8@news.povray.org...
>>> And presumably you're using either catenaries or a
>>> full mechanics simulation to produce hanging curves...?
>>
>> Ahh! Nothing nearly so sophisticated there I'm afraid :-). I have a loose
>> segment macro ....
>
> For catenaries, there is a set of macros by PM2Ring (2005)

What a tough assignment that turned out to be   ;o)

I couldn't quite get my head round the approach that PM2Ring took, so I 
spent the weekend swotting up on the maths (with long breaks for the 
headaches to subside), and worked out a way to just use the most rudimentary 
catenary formula. So it uses the value of 'a' to control the shape, which is 
the ratio between 'H' (the horizontal component of the tension in the rope) 
and 'w' (the weight per unit length).

The method used by PM2Ring has the advantage that you can specify the ratio 
between the straight-line length and the rope length to control the amount 
of sag in the rope, which is probably more intuitive than using 'a'. 
Nevertheless, I plan to finish the documentation and post the first version 
of the code in a couple of days. Then if anyone can improve on it we could 
incorporate that in a future version.

So here's the result. An image of the catenary juxtaposed behind my original 
with 'fake' gravity.

Regards,
Chris B.


Post a reply to this message


Attachments:
Download 'rope_04.jpg' (25 KB)

Preview of image 'rope_04.jpg'
rope_04.jpg


 

From: Thomas de Groot
Subject: Re: Rope Macro
Date: 3 Jun 2009 03:47:55
Message: <4a262aab$1@news.povray.org>
"Chris B" <nom### [at] nomailcom> schreef in bericht 
news:4a256926@news.povray.org...
> What a tough assignment that turned out to be   ;o)

Good work! I am always awed by people able to do these tricky things. I know 
I cannot. Thanks indeed for the effort.

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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