|
|
"Seany" <nomail@nomail> wrote:
> Guys, please help.
>
> This is my pov Ray code :
> ...
> However, Pov ray fails to render anything.
> ...
> I really want to see at least some things rendered.
Try the code below.
--
Tor Olav
http://subcube.com
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// SEASHELLS:
// THE PLAINNESS AND BEAUTY OF THEIR MATHEMATICAL DESCRIPTION
// http://www.mat.uc.pt/~picado/conchas/eng/article.pdf
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version 3.7;
global_settings { assumed_gamma 1.0 }
#include "colors.inc"
#include "functions.inc" // For f_r()
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare TwoPi = 2*pi;
#declare A = 25;
#declare Alpha = radians(83);
#declare Beta = radians(42);
#declare Mu = radians(20);
#declare Omega = radians(30);
#declare Phi = radians(70);
#declare a = 12;
#declare b = 20;
#declare Re_Fn = function(s) { 1/f_r(cos(s)/a, 0, sin(s)/b) };
#declare Range_u = array[2] { -2*TwoPi, +2*TwoPi }; // Turns: 2 + 2 = 4
#declare Range_v = array[2] { 0, TwoPi };
parametric {
function {
(
+A*sin(Beta)*cos(u)
+(
+cos(v + Phi)*cos(u + Omega)
-sin(Mu)*sin(v + Phi)*sin(u + Omega)
)*Re_Fn(v)
)*exp(u/tan(Alpha))
},
function {
(
-A*cos(Beta)
+cos(Mu)*sin(v + Phi)
*Re_Fn(v)
)*exp(u/tan(Alpha))
},
function {
(
+A*sin(Beta)*sin(u)
+(
+cos(v + Phi)*sin(u + Omega)
+sin(Mu)*sin(v + Phi)*cos(u + Omega)
)*Re_Fn(v)
)*exp(u/tan(Alpha))
}
<Range_u[0], Range_v[0]>, <Range_u[1], Range_v[1]>
contained_by {
sphere { -100*y, 200 } // Change with size of shell
}
max_gradient 40 // Increase if necessary
accuracy 1e-3 // Decrease towards zero if necessary
precompute 10 x, y, z
pigment { color 0.5*Blue + 0.4*White }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
background { color 0.5*Yellow + 0.4*White }
light_source {
1000*<-3, 2, 1>
color White
}
camera {
location 50*<1, 1, 6> // Change with size of shell
look_at -80*y // Change with size of shell
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
|