POV-Ray : Newsgroups : povray.beta-test : Isosurfaces *much* slower in beta 7? : Re: Isosurfaces *much* slower in beta 7? Server Time
30 Jul 2024 14:25:00 EDT (-0400)
  Re: Isosurfaces *much* slower in beta 7?  
From: JRG
Date: 30 Oct 2001 17:45:22
Message: <3bdf2d82@news.povray.org>
Right:
Here is the code without modifications:


#include "functions.inc"
#include "colors.inc"
//#include "woodmaps.inc"
#include "woods.inc"

#declare table_x=150;
#declare table_y=3;
#declare table_z=90;
#declare n=8;
#declare RS=seed(0);

#declare i=0;
#while (i<n)

#declare pig_wood=
pigment {
    wood
    scale 0.5
    turbulence 0.07
    rotate 90*y
    warp {
        black_hole
        <0,3/2,0>, 2
        strength 2
        falloff 2
        inverse
        repeat 2*<10,0,10>
        turbulence 0.5
    }
     rotate <rand(RS),rand(RS),rand(RS)>*2 translate
<rand(RS),rand(RS)*0,rand(RS)>*30


    }

#declare pig_func=
function { pigment {pig_wood color_map {[0 rgb 0][1 rgb 1]}}}


isosurface {
    function {
        f_rounded_box (x,y,z,0.5,table_x/2,table_y/2,table_z/2/n) +
pig_func(x,y,z).gray*0.08
    }
    accuracy 10^-3
    max_gradient 2
    evaluate 1,10,.99
    contained_by {box {-<table_x,table_y,table_z/n>/2,
<table_x,table_y,table_z/n>/2}}

    pigment {
        pig_wood
        color_map {M_Wood3A}
    }
    finish {ambient 0 diffuse 0.8 specular 0.1 roughness 0.02 brilliance
1.25}
    scale <1,1,0.99>
    translate (-table_z/n/2-table_z/n*i)*z+(-0.25+0.5*rand(RS))*y
    translate 50*z

}

#undef pig_func //without this one it crashes (in beta 6. I don't know about
beta 7 (which I have to reinstall))
#declare i=i+1;
#end


camera {
    location <0,20,-50>
    look_at 0
    rotate 10*y}

light_source {
    <150,150,-150>
    rgb 1.5
    fade_power 2
    fade_distance 300}

background {rgb 0.5}


Post a reply to this message

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