POV-Ray : Newsgroups : povray.newusers : Scaling question... : Re: Scaling question... Server Time
30 Jul 2024 22:25:01 EDT (-0400)
  Re: Scaling question...  
From: Christopher James Huff
Date: 26 Nov 2003 19:57:30
Message: <cjameshuff-72DA28.19553526112003@netplex.aussie.org>
In article <3fc4e81f@news.povray.org>, "Carl Hoff" <hof### [at] wtnet> wrote:

> #declare  P = function {x*x + y + z*z - 1}
> 
> isosurface {
>   function { P(x,y*(1.05-y/5),z) }
>   ...
> 
> Should P be the formula of a sphere?  In which case shouldn't
> the function be x*x+y*y+z*z-1?  If that's not a typo I'm really
> confused.  Hmmm... ok after looking closer I see you are substituting
> in a y*y term for y when you call the function.  But that leaves me
> wondering why you only scaled one of the y's?

That would expand to:
x*x + y*1.05 + y*y/5 + z*z - 1

Change the order to make what happens a little clearer:

x*x + y*y/5 + z*z - 1 + y*1.05

This is scaling the sphere along the y axis, and adjusting the radius 
according to distance along the y axis.


> Is there a difference between these two as used in an isosurface?

No difference. However, I find it easier to adjust things when the 
threshold is 0.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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