POV-Ray : Newsgroups : povray.text.scene-files : Source code for "Toroidal iso-noise" Server Time
8 Jul 2024 11:36:57 EDT (-0400)
  Source code for "Toroidal iso-noise" (Message 1 to 1 of 1)  
From: Tor Olav Kristensen
Subject: Source code for "Toroidal iso-noise"
Date: 7 Nov 2000 17:56:12
Message: <3A08883F.ECDFB741@online.no>
This is the code for the image I posted earlier today to 
povray.binary.images:

news://news.povray.org/3A076749.A8600675%40online.no


To get the image I posted to the same thread 5. Nov.,
just comment out this line:

   - 0.10*(1 - 2*WrinkleFunction(x, y, z))


You'll need MegaPov to render.


Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// Copyright 2000 by Tor Olav Kristensen
// mailto:tor### [at] hotmailcom
// http://www.crosswinds.net/~tok/tokrays.html
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version unofficial MegaPov 0.5;

#include "colors.inc"

global_settings { ambient_light color White }

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

#declare WrinkleFunction =
function { pigment { wrinkles color_map { [ 0 rgb 0 ] [ 1 rgb 1 ] } } }

$ SphereFunction = function { "sphere" <0> }

$ Rmaj = 0.6;
$ Rmin = 0.1;

$ TorusFunction = 
function { SphereFunction(SphereFunction(x, 0, z) - Rmaj, y, 0) - Rmin }

#declare ToroidalNoise =
isosurface {
  function {
   0.45 - 
   TorusFunction(
      1 - 2*noise3d(x   , y/10, z/10), 
     (1 - 2*noise3d(x/10, y   , z/10))*0.7, 
      1 - 2*noise3d(x/10, y/10, z   )
   )
   - 0.10*(1 - 2*WrinkleFunction(x, y, z))
 }
  contained_by { sphere { <0, 0, 0>, 200 } }
  method 2
}

object {
  ToroidalNoise
  pigment { color Gray50 }
  no_shadow
}

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

light_source {
  10*<3, 2, -3>
  color White + Blue
  fade_distance 40
  fade_power 4
}

#declare RR = seed(1);

#declare Cnt = 0;
#while (Cnt < 20)
  light_source {
    25*(<1, 1, 1>/2 - <rand(RR), rand(RR), rand(RR)>)
    color 2*Red
    fade_distance 3
    fade_power 4
  }
  #declare Cnt = Cnt + 1;
#end // while

camera {
  location <0, 0, -15.3>
  look_at <0, 0, 0>
  angle 90
}

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


Post a reply to this message

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