POV-Ray : Newsgroups : povray.general : F_Mesh1() func producing cube instead of mesh? Server Time
19 May 2024 22:12:13 EDT (-0400)
  F_Mesh1() func producing cube instead of mesh? (Message 1 to 3 of 3)  
From: Stefan Viljoen
Subject: F_Mesh1() func producing cube instead of mesh?
Date: 25 Sep 2004 10:12:03
Message: <41557cb2@news.povray.org>
Hi all.

What am I doing wrong:

#declare meshfunc = function{f_mesh1(x,y,z,0.2,0.2,0.3,0.4,0.5)}

isosurface
{
        function {meshfunc(x,y,z)}
        threshold 1

        contained_by
        {
                box {-1,1}
        }         
        
        material{texture{pigment{color White}}}
}

All this does is produce a white cube, sized 1x1x1. I can put any values
from very small to large (0.01 to 10) into the function line, but it still
only produces a white cube, instead of a mesh.

What is wrong with my parameters or code structure here?

Thanks!
-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: Mike Williams
Subject: Re: F_Mesh1() func producing cube instead of mesh?
Date: 25 Sep 2004 14:54:15
Message: <GdkdZDA46bVBFwm1@econym.demon.co.uk>
Wasn't it Stefan Viljoen who wrote:
>Hi all.
>
>What am I doing wrong:
>
>#declare meshfunc = function{f_mesh1(x,y,z,0.2,0.2,0.3,0.4,0.5)}
>
>isosurface
>{
>        function {meshfunc(x,y,z)}
>        threshold 1
>
>        contained_by
>        {
>                box {-1,1}
>        }         
>        
>        material{texture{pigment{color White}}}
>}
>
>All this does is produce a white cube, sized 1x1x1. I can put any values
>from very small to large (0.01 to 10) into the function line, but it still
>only produces a white cube, instead of a mesh.
>
>What is wrong with my parameters or code structure here?

All that's happening is that with "threshold 1" the thickness of each
thread is larger than the contained_by box, so the box gets completely
filled. Try setting the threshold to a much smaller value, like 0.01

You will then also need to increase max_gradient.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Stefan Viljoen
Subject: Re: F_Mesh1() func producing cube instead of mesh?
Date: 25 Sep 2004 17:50:38
Message: <4155e82d@news.povray.org>
Mike Williams wrote:

> Wasn't it Stefan Viljoen who wrote:
>>Hi all.
>>
>>What am I doing wrong:
>>
>>#declare meshfunc = function{f_mesh1(x,y,z,0.2,0.2,0.3,0.4,0.5)}

> You will then also need to increase max_gradient.

Thanks! That fixed it - I decreased the threshold and that did the trick. 

-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

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