|
|
//here is the code of my silly dog, have fun !
//---------------- target / objectif ---------------
//
// a silly dog
//
#include "textures.inc"
#include "shapes.inc"
//#include "glass.inc"
#include "metals.inc"
#include "colors.inc"
#include "woods.inc"
//#include "functions.inc"
#include "skies.inc"
//#include "stdinc.inc"
//#include "arrays.inc"
//#include "stones1.inc"
//#include "stones2.inc"
//
// +kf0.166 +kff20 +kc declare=fp=0
//
light_source {<5,20,-10> White*0.9}
light_source {<10,20,-10> White*0.9}
light_source {<15,0.4,-10> White*0.9 }
//-----------------------------------------------
sky_sphere{S_Cloud3}
//-----------------------------------------------
//---------------------------------- sol /ground
#declare sol=
box{<-100,0,-100>,<100,0.1,100>
pigment {color Pink}
}
//---------------------------------- right wall
#declare mur1=
box{<-100,0,99>,<100,50,99.01>
pigment {color rgb <0.5,0.5,0.00>}
}
//---------------------------------- left wall
#declare mur2=
box{<-100,0,100>,<-99.9,50,-100>
pigment {color rgb <0.5,0.5,0.00>}
}
//----------------------------------- background / fond
#declare decor= union{
object {sol}
object{mur1}
object{mur2}
}
//------------------------------ dog'shouse / niche
#declare niche=
union{
difference{
box{<0,0,0>,<3,3,3> pigment{color Green}}
box{<0.5,-0.1,1>,<3.5,2,2>}
box{<0.1,-0.1,0.1>,<2.9,2.8,2.9> }
}
difference{ //toit
box{<0,0,0>,<3,4,3> pigment{color Red}}
box{<0,0,-0.1>,<6,5,3.1> rotate z*40}
box{<0,0,-0.1>,<6,5,3.1> translate x*3rotate z*-60}
scale 1.2 scale y*0.8 translate<-0.3,2.70,-0.2> pigment{color Green}
}
}
//--------------------------------les peaux / the different skins
//-----------choice of colours
#declare coul1= texture{
//---------------------------
pigment {
color rgb <0.5,0.5,0.5>}
//---------------------------
/*
pigment {
gradient y //this is the PATTERN_TYPE //color_map bozo
color_map {
[0.1 color Red]
[0.3 color Yellow]
[0.6 color Blue]
[0.6 color Green]
[0.8 color Cyan]
}
}
*/
//---------------------------
/*
pigment {
gradient x //this is the PATTERN_TYPE
pigment_map {
[0.3 wood scale 0.2]
[0.3 Jade] //this is a pigment identifier
[0.6 Jade]
[0.9 marble turbulence 1]
}
}
//---------------------------
*/
/*
pigment {
julia <0.353, 0.288>, 30
interior 1, 1
color_map {
[0 rgb 0]
[0.2 rgb x]
[0.4 rgb x+y]
[1 rgb 1]
[1 rgb 0]
}
}
//---------------------------
*/
/*
pigment {
pigment_pattern {
checker White, Black
scale 2
turbulence .5
}
pigment_map {
[ 0, checker Red, Green scale .5 ]
[ 1, checker Blue, Yellow scale .2 ]
}
}
*/
//---------------------------
/*
pigment {
radial color_map{[0.5 Black][0.5 White]}
frequency 10
}
//---------------------------
*/
/*
pigment {
wood
warp {repeat x*2 offset z*0.05}
}
*/
//---------------------------
/*
pigment {
wood
scale .5
turbulence .2
}
*/
//---------------------------
/*
pigment {
wood
turbulence 0.5*y
rotate z*60
}
*/
//---------------------------
/*
pigment {
wood
translate <1,2,3> rotate x*45 scale 2
warp { turbulence <0,1,1> octaves 3 lambda 1.5 omega 0.3 }
}
*/
//---------------------------
/*
pigment {
hexagon
scale 0.1
warp {
toroidal
orientation y
dist_exp 1
major_radius 1
}
}
//---------------------------
*/
/*!!!
pigment{
image_map {
jpg "moonmapj.jpeg"
type 1
once
}}
*/
//---------------------------
/*
normal {
checker normal{gradient x scale .2},
normal{gradient y scale .2}
}
*/
//--------------------------- finishing
finish { phong 0.4 } }
//----------------------- the beast / la bete ------------------
//------------------------------body / corps
#declare cor= difference{
union{
cylinder{<0,0,0>,<3,0,0>,1
texture{coul1}
}
sphere{<0,0,0>,1
texture{coul1}
}
}
//diff
box{<0,0,-2>,<5,1,2>
rotate z*45
translate <2.9,-1.7,-1>
}
}
//------------------------------mouth / gueule
#declare gue=
blob{
threshold 0.6
cylinder{<2,0,-2>,<2,0,2>,1.5,0.8}
cylinder{<3.2,0,-2>,<3.2,0,2>,0.9,0.4}
pigment {color Gray30}
rotate z*25
}
//---------------------------left eye / oeil gauche
#declare og = union{
sphere{<0,0,0>,0.4
pigment {color White}
}
sphere{<0,0,0>,0.15
pigment {color Black}
scale z*0.20
translate z*-0.39
finish { phong 0.8 }
}
sphere{<0,0,0>,0.05
pigment {color White}
scale z*0.20
translate <-0.07,0.07,-0.405>
finish { phong 0.8 }
}
scale 0.8
}
//--------------------------left ear / oreille gauche
#declare org = union{
sphere{<0,0,0>,0.4
texture{coul1}
scale <0.35,1.1,0.35>
}
sphere{<-0.135,0,0>,0.20
texture{coul1}
scale <1.5,0.8,0.4>
translate <-0.01,0.33,0>
}
//scale 0.8
}
//-------------------------------------
//------------------------------right eye / oeil droit
#declare od = union{
sphere{<0,0,0>,0.4
pigment {color White}
}
sphere{<0,0,0>,0.20
pigment {color Black}
scale z*0.20
translate z*-.39
finish { phong 0.8 }
}
sphere{<0,0,0>,0.06
pigment {color White}
scale z*0.20
translate <-0.07,0.07,-0.415>
finish { phong 0.8 }
}
scale 0.8
}
//----------------------------- right ear / oreille droite
#declare ord =
sphere{<0,0,0>,0.4
texture{coul1}
scale <0.35,1.9,0.35>
}
//--------------------------------- nose / truffe
#declare tru =
sphere{<0,0,0>,0.2
pigment {color Gray10}
scale <0.9,1.1,1.7>
finish {phong 0.8 }
}
//--------------------------------- tail / queue
#declare que =
sphere{<0,0,0>,0.6
texture{coul1}
scale <0.2,2.5,0.2>
}
//----------------------------------legs / pattes
#declare pat =
sphere{<0,0,0>,0.8
texture{coul1}
scale <0.2,1,0.3>
}
//----------------------------------teeth / dents
#declare den=
cone{<0,0,0>,0.09,<0,0.6,0>,0.01
pigment {color rgb White}
}
//-------------------------------- tongue / langue
#declare lan=
sphere{<0,0,0>,0.4
texture{pigment{color Red}}
scale <2.0,0.15,1.0>
}
//--------------------------------bone / os
#declare nonos=union{
cylinder{<0,0,0>,<2,0,0>,0.25}
sphere{<0,0,0.25>,0.4}
sphere{<0,0,-0.25>,0.4}
sphere{<2,0,0.25>,0.4}
sphere{<2,0,-0.25>,0.4}
scale 0.5 pigment{color White}
}
//-------------------------------------
#declare chi= difference{
object{cor scale z*0.80}
object{gue translate <0.5,-0.5,0>}
}
//------------------------------------- union
#declare ouaoua=union{
//
object{chi translate <0,0,0>}
//
object {og rotate y*-30 translate <2,1.3,0>}
object {org rotate y*20 translate <2.0,1.8,0.2>}
//
object {od rotate y*20 translate <2.6,1.3,0>}
object {ord rotate y*20 translate <2.6,1.8,0.2>}
//
object{tru translate <3.0,0.95,0>}
object{den rotate z*25 translate <2.8,-0.1,-0.3>} //avt dro / forward right
object{den rotate z*25 translate <2.8,-0.1,0.3>} //avt gau / forward left
object{den scale y*0.5 rotate z*-180 translate <2.8,0.90,-0.2>} //arr dro
haut / right back top
object{den scale y*0.5 rotate z*-180 translate <2.8,0.90,0.2>} //arr gau haut
/ left back top
object{lan rotate z*0 translate <1.8,0.3,0>} //arr gau / back left
//
object{que translate <0.1,0.95,0>}
//
object{pat translate <0.2,-0.8,-0.4>}
object{pat translate <0.2,-0.8,0.4>}
object{pat translate <1.8,-0.8,-0.4>}
object{pat translate <1.8,-0.8,0.4>}
translate y*1.6
}
//------------------------------------------------
camera {perspective location <4, 4, -5> look_at<1,1.5,0>}//-- position de
reference / ref position
//camera {perspective location <1, 5, 0> look_at<1,-1,0>}//dessus / over
//------------------------------------------------
object{decor}
object{niche scale 0.85 translate <-10,0,4>}
object{ouaoua rotate 0*y translate y*0.0}
object{nonos rotate y*30 translate <-2,0.2,-1> }
//etc...
Post a reply to this message
|
|