|
|
Guys, please help.
This is my pov Ray code :
#include "colors.inc"
#include "glass.inc"
#include "golds.inc"
#include "metals.inc"
#include "stones.inc"
#include "woods.inc"
#include "shapes.inc"
#include "textures.inc"
#include "spectral.inc"
#include "rand.inc"
#include "param.inc"
#include "math.inc"
#declare MaxTrace = 60;
#declare Radio = 1;
#declare Photons = 10000000;
#declare Sunlight = 0;
#declare SkyEmission = 5;
#declare RoomDesign = 1;
camera { // sPlace the camera
sky <0,0,1> // Zenith of camera attached Ref Frame
direction <-1,0,0> // First look at left of the screen plane
right <4/3,0,0> // Right side expanded
location <50,0,120> // Camera location
look_at <8,5,50> // Where camera is pointing
angle 50 // Angle of the view
}
global_settings { ambient_light White } //Ambient light to "brighten up" darker
pictures
#declare Lamp = union {
light_source {<0,0,6>, SpectralEmission(E_Blackbody(5500)) * 2000
fade_power 2
fade_distance 5
photons {reflection on refraction on }
}
sphere { 0, 5
pigment { SpectralEmission(E_Blackbody(5500)) }
finish {emission 3 ambient 0 diffuse 0}
no_shadow
no_radiosity
}
translate <0, 150, 200>
}
object {Lamp}
background { color White}
/*plane {
<0,-0,1>, -2 //This represents the plane 0x+0y+z=0
texture { Copper_Metal} //The texture comes from the file "metals.inc"
}*/
#declare alp = 32.0*pi/180; // this is the shells own angular constant
#declare bet = -12.0*pi/180; // "
#declare omg = 1.5*pi/180; // rotation angle
#declare mu = 29*pi/180; // "
#declare phi = 17*pi/180; // "
#declare A = 20; // size
#declare D1 = 1; // direction of coiling
#declare D2 = -1; // ditto
#declare N = 7; // Number of spines
#declare W1 = 5*pi/180; // angle of spines
#declare W2 = 27*pi/180; // "
#declare L = 8*pi/180; // "
#declare P = 3*pi/180; // "
#declare a = 40; // Apperture semi major axis
#declare b = 17; // Apperture semi minor axis
#declare aperture_R = function(u,v) {
1 / sqrt(
pow(cos(u)/a,2)
+ pow(sin(u)/b,2)
)
}
#declare l = function(u) {
(2*pi/N) *
(
N*u/(2*pi) -
floor(N*u/(2*pi))
)
}
object {
parametric {
function { D1 * (
A*sin(bet)*cos(v)
+ cos(u)*cos(v)*aperture_R(u,v)
- sin(u)*sin(v)*aperture_R(u,v)
) * exp(v/tan(alp))
}
function { (
-1* A*sin(bet)*sin(v)
- cos(u)*sin(v)*aperture_R(u,v)
- sin(u)*cos(v)*aperture_R(u,v)
)*exp(v/tan(alp))
}
function { (
-1* A*cos(bet)
+ sin(u)*aperture_R(u,v)
)*exp(v/tan(alp))
}
<0,0>,<pi,pi>
accuracy 0.01
precompute 10 x,y,z
}
texture {NBwinebottle}
rotate <0,20,47>
scale <4,4,4>
}
I took the code from this paper:
http://www.mat.uc.pt/%7Epicado/conchas/eng/article.pdf
However, Pov ray fails to render anything.
I have tried shuffling the U and V component.
I have tried to move the camera again, and change the view direction
I am finding nothing - only white screen.
Please help.
I really want to see at least some things rendered.
Thank you
Post a reply to this message
|
|
|
|
Le 18-03-16 à 15:30, Bald Eagle a écrit :
> I looked at this one last night as well -- haven't figured out what the problem
> with this one is yet.
>
>
Just as an isosurface need to take count of the max_gradient, so does a
parametric. I don't know the default value, I don't find it in the
documentation, but you can probably assume the same value as that for
the isosurface.
Also, it have a default contained_by defined as :
contained_by box{-1, 1}.
It looks like the functions used need a larger max_gradient and also a
larger contained_by object.
Alain
Post a reply to this message
|
|
|
|
"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
|
|