POV-Ray : Newsgroups : povray.general : Cables : Re: Cables Server Time
30 Jul 2024 16:27:36 EDT (-0400)
  Re: Cables  
From: Tim Attwood
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.