我正在尝试使用POVRay 3.7来呈现此代码:
#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 "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>
}
我从here获取了代码。
但是,唯一的渲染是白色屏幕。我试过改组u
和v
参数。我试过改变相机的位置和方向。但是,我一无所获。
我哪里出错了?我很确定我的方程是正确的,但请帮助我。我真的需要帮助。谢谢。