POV-Ray : Newsgroups : povray.advanced-users : Pigment along a sphere_sweep : Re: Pigment along a sphere_sweep Server Time
6 Oct 2024 12:57:55 EDT (-0400)
  Re: Pigment along a sphere_sweep  
From: Mark Birch
Date: 20 Feb 2007 20:20:01
Message: <web.45db9d5f564aa52a4daddc090@news.povray.org>
Florian Brucker <tor### [at] torfboldcom> wrote:
> Hi!
>
> Is it possible to color a sphere_sweep along the spline? I.e. with a
> gradient that follows the spline instead of fixed direction. As the
> spline twists in all directions I can't fake it by using a standard
> gradient. I tried to transform the spline coordinates to something more
> accessible, but that fails because one has no possibility to know how
> far on the spline a given point (x,y,z) is. But perhaps I'm missing
> something :)
>
>
> Regards,
> Florian

I wrote a macro to generate a mesh2 object based on a spline path.
It doesn't allow for varying radius along the sweep, and the ends aren't
capped so it's just a hollow tube (no CSG).  It was written specifically
for doing texture-mapped hoses, so the UV mapping is worked out.  I'll post
it in binaries later.

Another simple method is to build the object with spheres & cylinders, and
apply the pigment individually to each object.

Mark


Post a reply to this message

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