POV-Ray : Newsgroups : povray.binaries.images : Isosurface help please : Re: Isosurface help please Server Time
19 Aug 2024 20:11:36 EDT (-0400)
  Re: Isosurface help please  
From: Mike Williams
Date: 21 Oct 2000 02:50:21
Message: <hRqTZHAdsT85EwIv@econym.demon.co.uk>
Wasn't it David Fontaine who wrote:
>Mike Williams wrote:
>
>> So, you meant to type
>>
>> isosurface {
>>    function {
>>     y - (abs(x/6+3-floor(x/6+3)-.5)-2/6)
>>    }
>>    contained_by { box { -3,3 } }
>>    pigment { color rgb x }
>> }
>
>No, I meant no y. I want the equation to return a value consistent with a
>sawtooth wave as x changes. The way I want to use this function is to create
>alternating solid and empty spaces.

If you remove the y, then your surface will always be only a series of x
planes. Typing

 function { abs(x/6+3-floor(x/6+3)-.5)-2/6}

Gives you the surface described by

 abs(x/6+3-floor(x/6+3)-.5)-2/6 = 0

If you want the surface

 abs(x/6+3-floor(x/6+3)-.5)-2/6 = y

You have to move the y to the left hand side of the equation before
turning it into a function.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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