POV-Ray : Newsgroups : povray.binaries.images : A couple of isosurfaces Server Time
1 Jun 2024 19:14:47 EDT (-0400)
  A couple of isosurfaces (Message 21 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: A couple of isosurfaces
Date: 13 Jul 2010 19:35:00
Message: <web.4c3cf7c7e5fe6399e67672890@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:
> Ok the source for both objects is pretty small, so I'll just drop it in
> here:

That's two interesting isosurfaces Tek. Thank you for sharing the code.

I had a look at the source code for Greebelium to see if I could modify
it a bit so that I could understand it better. Below is the result.

--
Tor Olav
http://subcube.com

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8
======= 9

#include "colors.inc"

// Greebelium by Tek

#declare Pigment_Gr =
  pigment { color Gray50 }

#declare Pigment_BlWh =
  pigment {
    crackle
    metric 1
    solid
    colour_map {
      [ 0.5 color Black ]
      [ 0.5 color White ]
    }
  }

#declare Pigment_Funches =
  pigment {
    crackle
    metric 1
    pigment_map {
      [ 0.0 Pigment_Gr   ]
      [ 0.1 Pigment_BlWh ]
    }
  }

#declare FunchesFn =
  function {
    pigment {
      average
      pigment_map {
        #local I = 0;
        #while (I < 3)
          #local A = pow(4, -I);
          [ A Pigment_Funches scale A ]
          #local I = I + 1;
        #end // while
      }
    }
  }

#declare IsoFn =
  function {
    max(
      y - FunchesFn(x, y, z).x,
      0.5 + min(y, -FunchesFn(x, y, z).x)
    )
  }

isosurface {
  function { IsoFn(x, y, z) }
  max_gradient 20
  contained_by {
    box {
     -<5, 1, 5>,
      <5, 1, 5>
    }
  }
  pigment { color White }
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8
======= 9


Post a reply to this message

From: Thomas de Groot
Subject: Re: A couple of isosurfaces
Date: 14 Jul 2010 03:17:44
Message: <4c3d6498@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> schreef in bericht 
news:web.4c3cf7c7e5fe6399e67672890@news.povray.org...
> I had a look at the source code for Greebelium to see if I could modify
> it a bit so that I could understand it better. Below is the result.

Nicely done, Tor.

Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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