POV-Ray : Newsgroups : povray.general : Cables Server Time
5 Nov 2024 11:19:40 EST (-0500)
  Cables (Message 1 to 3 of 3)  
From: HelveticaFanatic
Subject: Cables
Date: 9 Nov 2008 15:50:01
Message: <web.49174bf69d383534dd6406e80@news.povray.org>
I need to run cables along a wall that is defined by a spline; however, I want
the cables to sag between the clips that hold them to the walls. How can I do
this?


Post a reply to this message

From: Dan Connelly
Subject: Re: Cables
Date: 9 Nov 2008 16:38:22
Message: <4917584e@news.povray.org>
HelveticaFanatic wrote:
> I need to run cables along a wall that is defined by a spline; however, I want
> the cables to sag between the clips that hold them to the walls. How can I do
> this?
> 
> 

The equation you want to generate the cable trajectories is:
http://en.wikipedia.org/wiki/Catenary


Post a reply to this message

From: Tim Attwood
Subject: Re: Cables
Date: 9 Nov 2008 16:52:29
Message: <49175b9d$1@news.povray.org>
>I need to run cables along a wall that is defined by a spline; however, I 
>want
> the cables to sag between the clips that hold them to the walls. How can I 
> do
> this?
If you have a spline for the wall, then you can create
a spline for the cable using just the x and z components
of the wall spline, and provide your own y components.

#macro combineSpline (wallSpline, heightSpline)
   #local cable = spline { natural_spline,
   #local c = 0;
   #while (c<=1)
      c,<wallSpline(c).x,heightSpline(c).y,wallSpline(c).z>
      #local c=c+0.01
   #end
   };
   (cable)
#end

#declare CableSpline = combineSpline(wallSpline, heightSpline);


Post a reply to this message

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