|
|
OK, so I couldn't help myself.
Here's a working scene with good starting values for a through d, and some
initial ideas about what those parameters affect.
// Bill Walker "Bald Eagle" October 2019
// scene for Francois LE COAT
// based on equation for the SURFER application at:
// https://imaginary.github.io/80-cnrs/
#version 3.8;
global_settings {assumed_gamma 1.0 }
#include "colors.inc"
#include "functions.inc"
#include "math.inc"
camera {
location <0, 6.5, -15>
//location <0, 10, 3>
right x*image_width/image_height
up y
look_at <0, -2, 0>
//rotate -y*155
}
sky_sphere {pigment {rgb 1}}
light_source {<2, 5, -10> rgb 1}
//light_source {<-10, 8, -1> rgb 0.8} // fill light
#declare Tan = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {specular 0.2}}
#declare Tan2 = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {diffuse 0.7
specular 0.2 reflection 0.02}}
#declare Gray = texture {pigment {rgb 0.5}}
#declare Gray2 = texture {pigment {rgb 0.5}finish {diffuse 0.7 specular 0.2
reflection 0.02}}
#declare Shade = 1;
#declare _Red = texture {pigment {rgb <1, 0, 0>*Shade} finish {diffuse 0.7}}
#declare _Green = texture {pigment {rgb <0, 1, 0>*Shade} finish {diffuse 0.7}}
#declare _Blue = texture {pigment {rgb <0, 0, 1>*Shade} finish {diffuse 0.7}}
#declare Checker = texture {pigment {checker rgb 0 rgb 1} scale 2 finish
{diffuse 1}}
//##########POV-RAY###############Bald
Eagle##############2019###################
#declare Square = union {
triangle {<-5, 0, -5>, <-5, 0, 5>, <5, 0, -5>}
triangle {<5, 0, -5>, <-5, 0, 5>, <5, 0, 5> }
texture {Checker}
}
#declare Axes =
union {
#declare Line = 0.1;
#declare Base = Line*3;
#declare Length = 3.5;
#declare Ext = 0.5;
cylinder {<0, 0, 0>, <Length, 0, 0>, Line texture {_Red}}
cone {<Length, 0, 0>, Base, <Length+Ext, 0, 0>, 0 texture {_Red}}
text {ttf "timrom.ttf", "X", 0.02, 0.0 texture {_Red}
translate <2, -1.125, 0>
}
cylinder {<0, 0, 0>, <0, Length, 0>, Line texture {_Green}}
cone {<0, Length, 0>, Base, <0, Length+Ext, 0>, 0 texture {_Green}}
cylinder {<0, 0, 0>, <0, 0, Length>, Line texture {_Blue}}
cone {<0, 0, Length>, Base, <0, 0, Length+Ext>, 0 texture {_Blue}}
//no_shadow
}
//##########POV-RAY###############Bald
Eagle##############2019###################
object {Square translate -y*4}
object {Axes}
/* rearranging a bit and deleting extra unnecessary parentheses gives:
10*e
*/
#declare e = exp(1);//2.71828182845904523536028747135266249775724709369996;
// or #include "consts.inc"
// then just convert to SDL syntax (* this is untested)
#declare Equation = function (x, y, z, a, b, c, d) {
( pow (pow (x+2*a, 2) + pow (y+2*b, 2)-1, 2) - c+pow(2*z, 2) + d*pow (y+2*b,
2) ) *
( pow (pow (x+2*a, 2) + pow (y-2*b, 2)-1, 2) - c+pow(2*z, 2) + d*pow (y-2*b,
2) ) *
( pow (pow (x-2*a, 2) + pow (y/(2*b+1), 2)-1, 2) - c+pow(2*z, 2) + d*pow
(y/(2*b+1), 2) ) -
10 * e}
// And then plug it into an isosurface declaration,
// preferably with the max_gradient estimatiing equation
// to speed things up a bit.
// render with a very low accuracy to start: maybe 0.1
// I'd also keep lighting and textures the simplest possible, perhaps only using
a
// finish {specular 0.2} or 0.4
#declare Range = 1;
#declare Whole = yes;
#declare Label = no;
#declare Gradient = 50;
#declare Min_factor= 0.6;
#declare a = 0.8; // affects letter separation
#declare b = 0.55; // affects "girdle" of the 8
#declare c = 0.45; // affects top and bottom of numbers
#declare d = 0.45; // also affects top and bottom of numbers
isosurface {
function {Equation (x, y, z, a, b, c, d)}
//open
threshold 0.5
//max_gradient 10
accuracy 0.01
evaluate Gradient*Min_factor, sqrt(Gradient/(Gradient*Min_factor)), min
(0.7, 1.0)
contained_by {box {<-3, -2, -1>*Range, <Whole*3, 2.3, 1>*Range}}
texture {Tan} //interior_texture {Gray}
//texture {Tex1}
scale 1
}
Post a reply to this message
|
|