POV-Ray : Newsgroups : povray.binaries.images : Rope macro - Work in progress Server Time
9 Aug 2024 13:19:00 EDT (-0400)
  Rope macro - Work in progress (Message 10 to 19 of 19)  
<<< Previous 9 Messages Goto Initial 10 Messages
From: regdo
Subject: Re: Rope macro - Work in progress
Date: 1 Mar 2005 14:26:36
Message: <4224c1ec@news.povray.org>
Rick Measham wrote:
> Mike Williams wrote:
> 
>> This particular example has five strands, but the macro allows any
>> number not less than three.
>>
>> The macro supports left handed rope by setting a negative value to the
>> Twistiness parameter.
> 
> 
> I'd love to see an example of a three-strand rope with a left hand twist 
> to it .. there was something about this one that just didn't feel quite 
> right.
> 
> 
> Then:
> .... your next mission, should you choose to accept it, is to create a 
> macro for a stranded 3-strand rope. Not sure of the specs, but each 
> strand in hemp ropes tends to be a twist of smaller strands ...
> 
> Cheers!
> Rick
Why not directly implement a fractal rope, each smaller strand being a 
twist of smaller strands being ... ? ;-)
Regis


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rope macro - Work in progress
Date: 2 Mar 2005 09:04:26
Message: <4225c7ea$1@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
news:4223062d@news.povray.org...
> I'm currently working on a rope macro that will generate a rope along a
> spline.
>
> The output is a mesh2 with a uv_map.
>
> I'll make the macro available when it's finished.
>
>


Would be nice if the mesh could be written to a file....  :-)

Thomas


Post a reply to this message

From: Mike Williams
Subject: Re: Rope macro - Work in progress
Date: 2 Mar 2005 10:17:52
Message: <Ya6F5DAwZdJCFwJu@econym.demon.co.uk>
Wasn't it Thomas de Groot who wrote:
>
>"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
>news:4223062d@news.povray.org...
>> I'm currently working on a rope macro that will generate a rope along a
>> spline.
>>
>> The output is a mesh2 with a uv_map.
>>
>> I'll make the macro available when it's finished.
>>
>>
>
>
>Would be nice if the mesh could be written to a file....  :-)

Makemesh is supposed to be capable of that, and in fact it will write
such a file but for some reason it can't find it again afterwards in
order to re-use it. I didn't have that problem with SweepSpline.

I tried for a while, but couldn't work out what was going wrong. If you
want to try it, just add a Filename parameter to the Rope macro
definition

   #macro Rope(Track,Width,Strands,Twist,Fatness,U,V,Filename)

pass it onward to makemesh

   BuildWriteMesh2(Verts, Norms, UV, V, U-1, Filename)

and supply a filename when you call the macro

   Rope(Spline, 0.04, 5, 3, 1.5, 200, 50, "ropedata.inc")

If you happen to find out why that doesn't work, and how to fix it,
please let me know.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 03:32:15
Message: <4226cb8f@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
news:Ya6### [at] econymdemoncouk...
>
> If you happen to find out why that doesn't work, and how to fix it,
> please let me know.
>

I had no problems, Mike!
I included the file name to the macros, then called the rope with the
following code (in Rope.pov, but could be in any other scene I guess):

#include "ropedata.inc"
object {Surface
  texture { uv_mapping
    pigment {gradient v-5*u
      colour_map {
        [0   rgb <1,0.8,0.7>]
        [0.5 rgb <1,0.8,0.7>*0.5]
        [1   rgb <1,0.8,0.7>]
      }
      scale 0.003
    }
  }
  translate <0.5, 0, 0.5>
}


...and I got two identical ropes side by side (the original one, and the one
from ropedata.inc).

Thomas


Post a reply to this message

From: Mike Williams
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 05:10:49
Message: <IJyx9BASJuJCFw6g@econym.demon.co.uk>
Wasn't it Thomas de Groot who wrote:
>
>"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
>news:Ya6### [at] econymdemoncouk...
>>
>> If you happen to find out why that doesn't work, and how to fix it,
>> please let me know.
>>
>
>I had no problems, Mike!
>I included the file name to the macros, then called the rope with the
>following code (in Rope.pov, but could be in any other scene I guess):
>
>#include "ropedata.inc"
>object {Surface
>  texture { uv_mapping
>    pigment {gradient v-5*u
>      colour_map {
>        [0   rgb <1,0.8,0.7>]
>        [0.5 rgb <1,0.8,0.7>*0.5]
>        [1   rgb <1,0.8,0.7>]
>      }
>      scale 0.003
>    }
>  }
>  translate <0.5, 0, 0.5>
>}
>
>
>...and I got two identical ropes side by side (the original one, and the one
>from ropedata.inc).

I said that bit works. The file gets saved correctly.

The bit that doesn't work is when makemesh checks to see if the file
already exists and is supposed to read the data rather than
recalculating it. When I used makemesh in the same way in my SweepSpline
macro it all worked.


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 07:37:10
Message: <422704f6@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
news:IJy### [at] econymdemoncouk...
> I said that bit works. The file gets saved correctly.
>
> The bit that doesn't work is when makemesh checks to see if the file
> already exists and is supposed to read the data rather than
> recalculating it. When I used makemesh in the same way in my SweepSpline
> macro it all worked.
>

Sorry, Mike, got it wrong!
indeed, recalculates each time...
Shall have a more specific look. Seems something for Ingo...

Thomas


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 07:52:56
Message: <opsm2bljvjcs6ysw@frogeater.bredbandsbolaget.se>
On Thu, 3 Mar 2005 10:09:22 +0000, Mike Williams  
<nos### [at] econymdemoncouk> wrote:
> The bit that doesn't work is when makemesh checks to see if the file
> already exists and is supposed to read the data rather than
> recalculating it. When I used makemesh in the same way in my SweepSpline
> macro it all worked.


I downloaded rope.zip from your site and checked out makemesh.inc.  
Although the comments preceding BuildWriteMesh2 say that the macro will  
check if the file already exists, there doesn't appear to be any such  
check in the actual macro.



-- 
FE
()  ascii ribbon campaign - against html mail
/\                        - against microsoft attachments


Post a reply to this message

From: Mike Williams
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 09:19:22
Message: <eve$HGAdzxJCFwLZ@econym.demon.co.uk>
Wasn't it Fredrik Eriksson who wrote:
>On Thu, 3 Mar 2005 10:09:22 +0000, Mike Williams  
><nos### [at] econymdemoncouk> wrote:
>> The bit that doesn't work is when makemesh checks to see if the file
>> already exists and is supposed to read the data rather than
>> recalculating it. When I used makemesh in the same way in my SweepSpline
>> macro it all worked.
>
>
>I downloaded rope.zip from your site and checked out makemesh.inc.  
>Although the comments preceding BuildWriteMesh2 say that the macro will  
>check if the file already exists, there doesn't appear to be any such  
>check in the actual macro.

OK. I've added some code into Rope.inc that reads back the file
previously created by BuildWriteMesh2 if it already exists. The updated
version is now on the web page

<http://www.econym.demon.co.uk/pov/rope.htm>

(And I was wrong about it working for SweepSpline and have now made the
same change to it - I must have been confusing it with something else.)

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: dan B hentschel
Subject: Re: Rope macro - Work in progress
Date: 3 Mar 2005 15:50:01
Message: <web.422777a264b7b8e6a3fcf12a0@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote:
> I'm currently working on a rope macro that will generate a rope along a
> spline.
>
> The output is a mesh2 with a uv_map.
>
> I'll make the macro available when it's finished.

Wow. That certailnly puts my rope attempts to shame:

http://www.hentschels.com:8000/~pictures/cgi-bin/album/index.cgi?dir=/2004/11November/Ropes

Great work! :-)

 - dan B hentschel


Post a reply to this message

From: Thomas de Groot
Subject: Re: Rope macro - Work in progress
Date: 4 Mar 2005 02:59:46
Message: <42281572@news.povray.org>
Mike,
I have another version of makemesh where there is a CheckFileName(FileName)
macro. This seems to be missing in your (original) version.
When I run it, the file is not overwritten, but it is also not parsed from
the file...

Thomas


Post a reply to this message

<<< Previous 9 Messages Goto Initial 10 Messages

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