POV-Ray : Newsgroups : povray.newusers : Uneven Scaling on the Y-Axis : Re: Uneven Scaling on the Y-Axis Server Time
29 Jul 2024 16:33:52 EDT (-0400)
  Re: Uneven Scaling on the Y-Axis  
From: Mike Williams
Date: 30 Jul 2005 16:28:59
Message: <JJqx9DA$I+6CFwCH@econym.demon.co.uk>
Wasn't it Christoph Hormann who wrote:
>Potato Man wrote:
>> The post title is really my question this time:
>> 
>> How do you get uneven scaling on the Y-Axis?
>
>Not at all - uneven scaling would be a nonlinear transform and this 
>isn't possible in a raytracer.  See

It is, however, quite easy in POV to perform non-linear transformations
on isosurfaces. The original poster wants to perform the non-linear
transformation on a sphere, so there's no problem creating an isosurface
to apply the non-linear transformation to.


#declare  Sphere = function {x*x + y*y + z*z - 1}

isosurface {
  function { Sphere(x,y*(2.5-y*0.8),z) }
  max_gradient 4
  contained_by{sphere{0,1}}
  pigment {rgb 1}
}

Adjust the "2.5" to change the overall vertical scale.
Adjust the "0.8" to change how much the top differs from the bottom.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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