|
![](/i/fill.gif) |
/*
I'm trying to make the rear lights symetrical in a car I'm modelling in Pov 3.5
Beta 2.
Does anyone know why it's asymetrical?
Any help will be appreciated.
--
- Nekar
*/
////////////////////////////////
#declare Modelling = on;
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
// ---------------------------------------- //
camera
{
location <0.0, 7, -5>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 20>
}
sky_sphere
{ pigment { gradient y color_map { [0.0 color rgb<.6,.8,.9> ][.1 color
rgb<.3,.7,.9>] [1.0 color blue 0.6] }} }
plane { y, 1000 pigment
{
bozo scale 5000 turbulence 1
color_map { [0.0 color rgbt <1,1,1,1>][0.5 color rgbt <1,1,1,1>][1.0 color
rgbt <1,2,3,0>] }
}
hollow on }
#declare Salt = texture { pigment {color rgb 1}}
light_source
{ 0*x // light's position (translated below)
color rgb <2.2,2.1,2> // light's color
translate <-3000, 3000, -3000>
}
// ----------------------------------------
plane { y, -1 texture {Salt}}
#macro Cars (Colour, Angle, Position, Turn)
#declare Metallic1 = texture { pigment{color rgb <.1,.3,.5>}
finish{ reflection .15 specular 1 phong .2 }
}
#declare StrengthVal = 1.0; // (+ or -) strength of component's radiating
density
#declare RadiusVal = 1.0; // (0 < RadiusVal) outer sphere of influence on
other components
#declare CarFins=difference { blob{threshold .5
cylinder { (y*.2),(y*-.2), StrengthVal, RadiusVal
scale <7,4,9> rotate z*15 scale <3,1,1>translate <6,-1.1,0>} // scale <2,.9,.9>
translate x*15 done
cylinder { (y*.5),(y*-.5), StrengthVal, -10 scale
<20,.6,2> translate <5,.8,0>} // tailfin
sphere { <0, 0, 0>, StrengthVal,-10 scale <15,5,9>
translate <-8,2,0>}
// subtract curve
cylinder { <0,.18,.5>,<0,-.18,-.5>, StrengthVal, -9
scale <5.5,1.6,1.0> translate <2,0,-3> pigment {color rgb 0}} // top inlet
cylinder { <0,.18,-.5>,<0,-.18,.5>, StrengthVal, -9
scale <5.5,1.6,1.0> translate <2,0,3> pigment {color rgb 0}} // top inlet
sphere { <0, 0, 0>, StrengthVal,-1 scale <5,15,15>
rotate z*-15 translate <9,-7,0>}
// Subtract Rear
sphere { <0, 0, 0>, StrengthVal,-1 scale <10,15,15>
translate <20,-7,0>}
// SubtractRear excess
}
plane {y, -2.0}
}
#declare rearlights = blob{threshold 1
sphere { <0, 0, 0>, StrengthVal, 20 scale
<.3,1.4,1.8> rotate <0,30,40> translate <8.5,.4,-2.8>}// rear lights
sphere { <0, 0, 0>, StrengthVal, 20 scale
<.3,1.4,1.8> rotate <0,-30,40> translate <8.5,.4,2.8>} // rear lights
sphere { <0, 0, 0>, StrengthVal, -30 scale
<10,10,3> rotate <0,-30,40> translate <8.5,.5,0>} // rear lights
sphere { <0, 0, 0>, StrengthVal, -50 scale
<10,.5,10> rotate <0,-30,40> translate <8.5,-.5,0>} // rear lights
// sphere{ <0, 0, 0>, StrengthVal, 20 scale
<.3,.6,1.3> rotate <0,30,40> translate <8.5,.5,-2.9>}// rear lights
// sphere{ <0, 0, 0>, StrengthVal, 20 scale
<.3,.6,1.3> rotate <0,-30,40> translate <8.5,.5,2.9>} // rear lights
}
#declare rLightOut = texture {pigment { color rgbf <1,0,0,.1>} finish
{reflection <1,.1,0> }}
#declare Car = union { difference { union{ difference { object{CarFins }
object { rearlights pigment {color rgb 0}
inish{ reflection 2 specular 1 /*ambient 1*/}}
}
intersection { object{CarFins pigment { color rgbt <.1,.2,.3,.5>}
finish {reflection.2 }}
object { rearlights texture {rLightOut} }
}
scale x*1.1
}
cylinder { <-3.5,-1,1.5>, <-3.5,-1,5>, 1.5 }
cylinder { <-3.5,-1,-1.5>, <-3.5,-1,-5>, 1.5 }
cylinder { <7,-1,1.7>, <7,-1,5>, 1.5 }
cylinder { <7,-1,-1.7>, <7,-1,-5>, 1.5 }
}
translate x*-2
texture{Metallic1}
}
object{Car rotate Angle translate Position}
#end
Cars (2, y*90, <0,1.2,15>, 0)
Post a reply to this message
|
![](/i/fill.gif) |