|
![](/i/fill.gif) |
ingo <ing### [at] tag povray org> wrote in
news:Xns### [at] netplex aussie org:
>
> 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
|
![](/i/fill.gif) |