POV-Ray : Newsgroups : povray.binaries.scene-files : blobbed iso for ball collection Server Time
1 Sep 2024 22:15:08 EDT (-0400)
  blobbed iso for ball collection (Message 1 to 3 of 3)  
From: ingo
Subject: blobbed iso for ball collection
Date: 17 Oct 2003 14:00:36
Message: <Xns9417CB8CAB81Aseed7@netplex.aussie.org>


Post a reply to this message


Attachments:
Download 'cage.pov.txt' (2 KB)

From: Tor Olav Kristensen
Subject: Re: blobbed iso for ball collection
Date: 20 Oct 2003 17:53:22
Message: <Xns941AF2FFC83ADtorolavkhotmailcom@204.213.191.226>
ingo <ing### [at] tagpovrayorg> wrote in 
news:Xns### [at] netplexaussieorg:

> 
> begin 644 cage.pov
> Attachment decoded: cage.pov
> `
> end

I have modified the code in cage.pov so that it now renders about
twice as fast (at least on my PC).


Tor Olav



// -------------------------------------------------------------------
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.5
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//
// Modified for faster rendering by
// Tor Olav Kristensen 20. October 2003
// -------------------------------------------------------------------

#version 3.5;

#include "colors.inc"
#include "functions.inc"

global_settings {
  assumed_gamma 1.0
}

// -------------------------------------------------------------------

camera {
  location <0.0, 0.5, -5.0>
  look_at <0.0, 0.0,  0.0>
  right x*image_width/image_height
}

light_source {
  <500, 500, -500>
  color White
}
light_source {
  <-500, 50, -50>
  color rgb <0.3, 0.3, 0.6>*0.5
}
light_source {
  <0, 0, 0>
  color rgb <1, 1, 0.5>
}

// -------------------------------------------------------------------

#declare Angle1 = radians(90);
#declare Angle2 = radians(15);
#declare Angle3 = radians(36);

#declare Rmajor = 1.6;
#declare Rminor = 0.015;

#declare Blob_threshold = 0.0005;

// -------------------------------------------------------------------

#declare Sin1 = sin(Angle1);
#declare Cos1 = cos(Angle1);

#declare RotatedTorusFn =
  function {
//    f_torus( x,  y*Cos1 +z*Sin1, -y*Sin1 +z*Cos1 , Rmajor, Rminor)
    f_torus(x, z, y, Rmajor, Rminor) // Faster. Use if Angle1 = 90deg
  }

#declare BlobFn =
  function {
    (1 + Blob_threshold)
    #local I = 0;
    #while (I < 12)
      #declare Cos2 = cos(I*Angle2);
      #declare Sin2 = sin(I*Angle2);
     -pow(
        Blob_threshold,
        RotatedTorusFn( x*Cos2 -z*Sin2,  y,  x*Sin2 +z*Cos2)
      )
      #local I = I + 1;
    #end // while
   -f_noise3d(f_wrinkles(x, y, z)*3, y, f_wood(5*x, y, z))
  }

#declare RotateAroundXFn =
  function(x, y, z, Cos, Sin) {
    BlobFn( x,  y*Cos +z*Sin, -y*Sin +z*Cos)
  }

#declare RotateAroundYFn =
  function(x, y, z, Cos, Sin) {
    BlobFn( x*Cos +z*Sin,  y, -x*Sin +z*Cos)
  }

isosurface {
  function {
    RotateAroundXFn(x, y, z, cos(x*Angle3), sin(x*Angle3))
//    RotateAroundYFn(x, y, z, cos(y*Angle3), sin(y*Angle3))
  }
  contained_by { box { -<1, 1, 1>*2, <1, 1, 1>*2 } }
//  threshold 0.0
  accuracy 0.001
  max_gradient 10.5                  
//  evaluate 5, 1.2, 0.95           
  pigment { color White }
}

// -------------------------------------------------------------------


Post a reply to this message

From: ingo
Subject: Re: blobbed iso for ball collection
Date: 21 Oct 2003 04:26:26
Message: <Xns941B6A348F70Dseed7@netplex.aussie.org>
in news:Xns### [at] 204213191226 Tor Olav 
Kristensen wrote:

> I have modified the code in cage.pov so that it now renders about
> twice as fast (at least on my PC).
> 

:)

Thanks Tor Olav, seems I have something to study tonight.

Ingo


Post a reply to this message

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