POV-Ray : Newsgroups : povray.text.scene-files : Cable/String Server Time
29 Jul 2024 04:31:46 EDT (-0400)
  Cable/String (Message 1 to 7 of 7)  
From: K  Tyler
Subject: Cable/String
Date: 11 Jul 1998 05:08:23
Message: <35A70F50.416B7808@pacbell.net>
One topic that seems to come up alot is how do I make
a peice of string or cable or rope.
Below find an example of one method that me be employed.
Although not the only method it is at least elegant.

Submitted by

K.Tyler

*******************************
  #include "colors.inc"
  #include "textures.inc"

  camera{location<0,0,-500>look_at<0,0,0>}
  light_source{<0,200,-300>color White}

  #declare AA = union{
  sphere{< 0,0, 0>,5 pigment{Black   }finish{Shiny}}
  sphere{<-4,0, 4>,5 pigment{Red     }finish{Shiny}}
  sphere{<-4,0,-4>,5 pigment{Yellow}finish{Shiny}}
  sphere{< 4,0, 4>,5 pigment{Green  }finish{Shiny}}
  sphere{< 4,0,-4>,5 pigment{Blue
}finish{Shiny}}scale<1,2,1>}

  #declare BB = union{
  sphere{< 0,0, 0>,15}sphere{<-14,0,
14>,15}sphere{<-14,0,-14>,15}
  sphere{<14,0,14>,15}sphere{< 14,0,-14>,15}scale<1,2,1>}

  union{
  #declare CC = 0
  #while (CC<500)
  #declare X1 = x*.001*CC
  #declare Y1 = y*1*CC
  object{AA translate y*-200 translate X1+Y1 rotate X1+Y1}
  #declare CC = CC+3 #end scale 1 translate 100*x}

  union{
  #declare CC = 0
  #while (CC<500)
  #declare X1 = x*.001*CC
  #declare Y1 = y*1*CC
  object{BB translate y*-200 translate X1+Y1 rotate X1+Y1
  texture{pigment{gradient x color_map{[.15 Wheat][.3
LightWood][.45 Straw]
  [.6 LightWood][.75 Straw][.9 LightWood][1 Straw]}rotate
X1+Y1}
  finish{ambient .4 diffuse .2}normal{gradient x rotate
X1+Y1}scale 15}}
  #declare CC = CC+3 #end scale 1 translate 100*-x}


Post a reply to this message

From: JK
Subject: Re: Cable/String
Date: 13 Jul 1998 20:17:54
Message: <35AA951F.51003AAC@hotmail.com>
K. Tyler wrote:

> One topic that seems to come up alot is how do I make
> a peice of string or cable or rope.
> Below find an example of one method that me be employed.
> Although not the only method it is at least elegant.
>
> Submitted by
>
> K.Tyler
>
> *******************************
>   #include "colors.inc"
>   #include "textures.inc"
>
>   camera{location<0,0,-500>look_at<0,0,0>}
>   light_source{<0,200,-300>color White}
>
>   #declare AA = union{
>   sphere{< 0,0, 0>,5 pigment{Black   }finish{Shiny}}
>   sphere{<-4,0, 4>,5 pigment{Red     }finish{Shiny}}
>   sphere{<-4,0,-4>,5 pigment{Yellow}finish{Shiny}}
>   sphere{< 4,0, 4>,5 pigment{Green  }finish{Shiny}}
>   sphere{< 4,0,-4>,5 pigment{Blue
> }finish{Shiny}}scale<1,2,1>}
>
>   #declare BB = union{
>   sphere{< 0,0, 0>,15}sphere{<-14,0,
> 14>,15}sphere{<-14,0,-14>,15}
>   sphere{<14,0,14>,15}sphere{< 14,0,-14>,15}scale<1,2,1>}
>
>   union{
>   #declare CC = 0
>   #while (CC<500)
>   #declare X1 = x*.001*CC
>   #declare Y1 = y*1*CC
>   object{AA translate y*-200 translate X1+Y1 rotate X1+Y1}
>   #declare CC = CC+3 #end scale 1 translate 100*x}
>
>   union{
>   #declare CC = 0
>   #while (CC<500)
>   #declare X1 = x*.001*CC
>   #declare Y1 = y*1*CC
>   object{BB translate y*-200 translate X1+Y1 rotate X1+Y1
>   texture{pigment{gradient x color_map{[.15 Wheat][.3
> LightWood][.45 Straw]
>   [.6 LightWood][.75 Straw][.9 LightWood][1 Straw]}rotate
> X1+Y1}
>   finish{ambient .4 diffuse .2}normal{gradient x rotate
> X1+Y1}scale 15}}
>   #declare CC = CC+3 #end scale 1 translate 100*-x}

  Sure.. that's a way to do it. I honestly think a much simpler way is
translating and rotating spheres with a high density, so the string
looks solid... I can send you an example if you like, mr Tyler.

CU around,
JK


Post a reply to this message

From: K  Tyler
Subject: Re: Cable/String
Date: 13 Jul 1998 20:25:53
Message: <35AA8958.D8BC06C5@pacbell.net>
Ok. I'd like to look at it.
Thanks K.Tyler

JK wrote:

> K. Tyler wrote:
>
> > One topic that seems to come up alot is how do I make
> > a peice of string or cable or rope.
> > Below find an example of one method that me be employed.
> > Although not the only method it is at least elegant.
> >
> > Submitted by
> >
> > K.Tyler
> >
> > *******************************
> >   #include "colors.inc"
> >   #include "textures.inc"
> >
> >   camera{location<0,0,-500>look_at<0,0,0>}
> >   light_source{<0,200,-300>color White}
> >
> >   #declare AA = union{
> >   sphere{< 0,0, 0>,5 pigment{Black   }finish{Shiny}}
> >   sphere{<-4,0, 4>,5 pigment{Red     }finish{Shiny}}
> >   sphere{<-4,0,-4>,5 pigment{Yellow}finish{Shiny}}
> >   sphere{< 4,0, 4>,5 pigment{Green  }finish{Shiny}}
> >   sphere{< 4,0,-4>,5 pigment{Blue
> > }finish{Shiny}}scale<1,2,1>}
> >
> >   #declare BB = union{
> >   sphere{< 0,0, 0>,15}sphere{<-14,0,
> > 14>,15}sphere{<-14,0,-14>,15}
> >   sphere{<14,0,14>,15}sphere{< 14,0,-14>,15}scale<1,2,1>}
> >
> >   union{
> >   #declare CC = 0
> >   #while (CC<500)
> >   #declare X1 = x*.001*CC
> >   #declare Y1 = y*1*CC
> >   object{AA translate y*-200 translate X1+Y1 rotate X1+Y1}
> >   #declare CC = CC+3 #end scale 1 translate 100*x}
> >
> >   union{
> >   #declare CC = 0
> >   #while (CC<500)
> >   #declare X1 = x*.001*CC
> >   #declare Y1 = y*1*CC
> >   object{BB translate y*-200 translate X1+Y1 rotate X1+Y1
> >   texture{pigment{gradient x color_map{[.15 Wheat][.3
> > LightWood][.45 Straw]
> >   [.6 LightWood][.75 Straw][.9 LightWood][1 Straw]}rotate
> > X1+Y1}
> >   finish{ambient .4 diffuse .2}normal{gradient x rotate
> > X1+Y1}scale 15}}
> >   #declare CC = CC+3 #end scale 1 translate 100*-x}
>
>   Sure.. that's a way to do it. I honestly think a much simpler way is
> translating and rotating spheres with a high density, so the string
> looks solid... I can send you an example if you like, mr Tyler.
>
> CU around,
> JK


Post a reply to this message

From: Morpheus Dreamlord
Subject: Or why not use the link.inc file and create a cable that looks like string? *NT*
Date: 13 Jul 1998 23:53:31
Message: <35AAC817.9592E854@mailexcite.com>
NT means no text! (The link.inc can be found on the pov .inc sites.

-- 
The only good politician is a dead politician !!
Politics or religion = corruption and true evil.
Believe 1% of what you see or hear.
The laws that politicians make are mostly bad laws,
  we'd do far better without them - the politicians AND their laws.


Post a reply to this message

From: K  Tyler
Subject: Re: Cable/String
Date: 14 Jul 1998 01:08:40
Message: <35AACB9B.E8B26BB4@pacbell.net>
> K. Tyler wrote:
>
> > *******************************
> >   #include "colors.inc"
> >   #include "textures.inc"
> >
> >   camera{location<0,0,-500>look_at<0,0,0>}
> >   light_source{<0,200,-300>color White}
> >
> >   #declare AA = union{
> >   sphere{< 0,0, 0>,5 pigment{Black   }finish{Shiny}}
> >   sphere{<-4,0, 4>,5 pigment{Red     }finish{Shiny}}
> >   sphere{<-4,0,-4>,5 pigment{Yellow}finish{Shiny}}
> >   sphere{< 4,0, 4>,5 pigment{Green  }finish{Shiny}}
> >   sphere{< 4,0,-4>,5 pigment{Blue
> > }finish{Shiny}}scale<1,2,1>}
> >
> >   #declare BB = union{
> >   sphere{< 0,0, 0>,15}sphere{<-14,0,
> > 14>,15}sphere{<-14,0,-14>,15}
> >   sphere{<14,0,14>,15}sphere{< 14,0,-14>,15}scale<1,2,1>}
> >
> >   union{
> >   #declare CC = 0
> >   #while (CC<500)
> >   #declare X1 = x*.001*CC
> >   #declare Y1 = y*1*CC
> >   object{AA translate y*-200 translate X1+Y1 rotate X1+Y1}
> >   #declare CC = CC+3 #end scale 1 translate 100*x}
> >
> >   union{
> >   #declare CC = 0
> >   #while (CC<500)
> >   #declare X1 = x*.001*CC
> >   #declare Y1 = y*1*CC
> >   object{BB translate y*-200 translate X1+Y1 rotate X1+Y1
> >   texture{pigment{gradient x color_map{[.15 Wheat][.3
> > LightWood][.45 Straw]
> >   [.6 LightWood][.75 Straw][.9 LightWood][1 Straw]}rotate
> > X1+Y1}
> >   finish{ambient .4 diffuse .2}normal{gradient x rotate
> > X1+Y1}scale 15}}
> >   #declare CC = CC+3 #end scale 1 translate 100*-x}
>

JK wrote:

> I honestly think a much simpler way is
> translating and rotating spheres with a high density, so the string
> looks solid.
> CU around,
> JK

    That's exactly what the above script does. Albeit I'm only
using a small quantity of spheres for the group.
If I remember correctly the Script  produces somewhere around
20,000 objects but don't quote me on it
KT


Post a reply to this message

From: Twyst
Subject: Re: Cable/String
Date: 14 Jul 1998 15:23:50
Message: <35aba236.0@news.povray.org>
Well, there used to be a freeware program called WORM. it's a MSDos program,
 and lets you graphically draw "worms".. It does arcs, lines, and splines.
It's REALLY good for doing cables.

It outputs in CTDS format..

(CTDS is Connect the dots System..)

I have written a converter in Visual Basic, that will read CTDS, and output
to Moray UDO/Povray INC pairs. It handles multiple objects, and it works
pretty well . =)

A friend is also working on a PERL script to do the same thing.

If people are interested, I'll put both on my site.
(worm is about 400K zipped, and the converter, without the VB5 Runtimes is
only 50k)

Twyst=====================================
pov-ray news, reviews and tutorials
http://twysted.net
e-mail: twy### [at] twystednet
==========================================


Post a reply to this message

From: JK
Subject: Re: Cable/String
Date: 14 Jul 1998 18:59:33
Message: <35ABD439.82B82FC2@hotmail.com>
K. Tyler wrote:

> > K. Tyler wrote:
> >
> > > *******************************
> > >   #include "colors.inc"
> > >   #include "textures.inc"
> > >
> > >   camera{location<0,0,-500>look_at<0,0,0>}
> > >   light_source{<0,200,-300>color White}
> > >
> > >   #declare AA = union{
> > >   sphere{< 0,0, 0>,5 pigment{Black   }finish{Shiny}}
> > >   sphere{<-4,0, 4>,5 pigment{Red     }finish{Shiny}}
> > >   sphere{<-4,0,-4>,5 pigment{Yellow}finish{Shiny}}
> > >   sphere{< 4,0, 4>,5 pigment{Green  }finish{Shiny}}
> > >   sphere{< 4,0,-4>,5 pigment{Blue
> > > }finish{Shiny}}scale<1,2,1>}
> > >
> > >   #declare BB = union{
> > >   sphere{< 0,0, 0>,15}sphere{<-14,0,
> > > 14>,15}sphere{<-14,0,-14>,15}
> > >   sphere{<14,0,14>,15}sphere{< 14,0,-14>,15}scale<1,2,1>}
> > >
> > >   union{
> > >   #declare CC = 0
> > >   #while (CC<500)
> > >   #declare X1 = x*.001*CC
> > >   #declare Y1 = y*1*CC
> > >   object{AA translate y*-200 translate X1+Y1 rotate X1+Y1}
> > >   #declare CC = CC+3 #end scale 1 translate 100*x}
> > >
> > >   union{
> > >   #declare CC = 0
> > >   #while (CC<500)
> > >   #declare X1 = x*.001*CC
> > >   #declare Y1 = y*1*CC
> > >   object{BB translate y*-200 translate X1+Y1 rotate X1+Y1
> > >   texture{pigment{gradient x color_map{[.15 Wheat][.3
> > > LightWood][.45 Straw]
> > >   [.6 LightWood][.75 Straw][.9 LightWood][1 Straw]}rotate
> > > X1+Y1}
> > >   finish{ambient .4 diffuse .2}normal{gradient x rotate
> > > X1+Y1}scale 15}}
> > >   #declare CC = CC+3 #end scale 1 translate 100*-x}
> >
>
> JK wrote:
>
> > I honestly think a much simpler way is
> > translating and rotating spheres with a high density, so the string
> > looks solid.
> > CU around,
> > JK
>
>     That's exactly what the above script does. Albeit I'm only
> using a small quantity of spheres for the group.
> If I remember correctly the Script  produces somewhere around
> 20,000 objects but don't quote me on it
> KT

  I know that's what the script does :)
I just think you could do a much simpler rotation with just one loop per
string of spheres...
I'll look up a nice example and send it to you...

JK


Post a reply to this message

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