POV-Ray : Newsgroups : povray.binaries.images : Sphere_sweep: gradient along a curve. : Re: Sphere_sweep: gradient along a curve. Server Time
30 Jul 2024 00:27:12 EDT (-0400)
  Re: Sphere_sweep: gradient along a curve.  
From: Le Forgeron
Date: 15 Feb 2014 13:22:15
Message: <52ffb057$1@news.povray.org>
Le 11/02/2014 14:47, Robert McGregor nous fit lire :
> Le_Forgeron <lef### [at] freefr> wrote:
>> Le 11/02/2014 00:14, Robert McGregor a écrit :
>>
>>> If POV-Ray could auto-calculate UVs on sphere_sweeps at render time, that would
>>> be the optimal solution to this... maybe a simple patch can fix it.
>>
>> Something like u being the "position" on the sphere_sweep and v being
>> the circumference ?
>> A few questions:
>> * for u, what is the range ? 0 to 1 for the whole sphere_sweep, or 0 to
>> n-1, n being the number of coordinates ?

> Exactly: u = spline position, v = circumference
> 
> I think a normalized u over 0-1 range for the entire sweep would make texturing
> more manageable, using something like:
> 
> sphere_sweep {
>    ...
>    texture { uv_mapping
>       pigment {
>          gradient u
>          color_map { [0 rgb <1,0,0>][1 rgb <0,1,0>]] }
>       }
>    }
> }
> 

One additional question: should u (range 0,1) be spaced regularly by :
 * the defining spheres (so for N segments, first segment is 0 to 1/(N+1))
 * the length of all segments (kind of introducing intermediate steps
when two consecutive spheres are further apart than the other, when
using the first solution is used)


Post a reply to this message

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