|  |  | Wasn't it Mienai who wrote:
>So I have a bicubic patch and I'm trying to apply two marble pattern
>textures to it with uv mapping, one rotated 90 degrees from the other.
>Unfortunately the rotation causes the pattern to become stretched instead
>of being rotated.  Anyone know why and/or how to fix this?
You have to rotate around the z axis only.
(I suppose, theoretically, as a UV mapped texture you ought to rotate
around the W axis, but there isn't one.)
I used 
  uv_mapping
  
  texture {pigment {marble 
    scale 0.1 
    colour_map {[0.5 rgb 1][0.5 rgb x]}
    rotate z*90
  }}
  texture {pigment {marble
    scale 0.1 
    colour_map {[0.5 rgbt 1][0.5 rgb x]}
  }}
-- 
Mike Williams
Gentleman of Leisure
Post a reply to this message
 |  | 
|  |  | Mike Williams <nos### [at] econym demon  co  uk> wrote:
> You have to rotate around the z axis only.
>
> (I suppose, theoretically, as a UV mapped texture you ought to rotate
> around the W axis, but there isn't one.)
>
> I used
>
>
>   uv_mapping
>
>   texture {pigment {marble
>     scale 0.1
>     colour_map {[0.5 rgb 1][0.5 rgb x]}
>     rotate z*90
>   }}
>   texture {pigment {marble
>     scale 0.1
>     colour_map {[0.5 rgbt 1][0.5 rgb x]}
>   }}
>
>
>
> --
> Mike Williams
> Gentleman of Leisure
Thanks, that was exactly what I was looking for. Post a reply to this message
 |  | 
|  |  | hello,
i want to model cable with 2 parts : cylindrical and part of torus.
for cylindrical, i have no problem. code i use is :
#declare p1 = 8;    // number of helixes 
#declare p2 = 0.25; // number of turns per unit length 
#declare p3 = 1.75; // minor radius
#declare p4 = 1.50; // major radius
#declare p5 = 1.00; // shape parameter
#declare p6 = 1;    // cross section type -> circle
#declare p7 = 0;    // cross section rotation angle
#declare containerSize = 3.20;
#declare maxGradiantValue = 10;
#declare cableFunction = function { f_helix1(x, y, z, p1, p2, p3, p4, 
p5, p6, p7) }
#declare cableCyl = isosurface {
  function { cableFunction(x,y,z) }
  contained_by { 
    box { <+containerSize, 0.00, +containerSize> <-containerSize, 
-cableLen, -containerSize>   }
    }
  max_gradient maxGradiantValue
  }
for "torus part", i do this code :
#declare cableTorus = isosurface {
  function { cableFunction(f_r(x,y,z)-MajorRadius, y, f_th(x,y,z)) }
  contained_by { 
    sphere { 0,*MajorRadius1.2 }
    }
  max_gradient maxGradiantValue
  rotate 90*x 
  }
with MajorRadius = 80.00
... but all the thing a get is a plain torus !!!
anyone can help me ?
thanks
Post a reply to this message
 |  |