/* ============================ borrome avec anse - Alain Esculier - Mars 2016 ======================= */
#version 3.7;
global_settings { assumed_gamma 2. }
#include "colors.inc"
#include "metals.inc"
#include "glass.inc"
#include "transforms.inc" // various geometric transformation macros
camera { orthographic location <0,0,-30> look_at<0.,-0.0,0> right 1*x angle 30} // perspective // right 16/9*x // borromee
light_source { <-20,40,-40>*80 color rgb <1,1,1> // shadowless
// area_light <1,0,0>, <0,0,1>,4, 4 // jitter
}
light_source { <10,20,-30>*80 color White shadowless} // }
//light_source { <10,-10,-20>*200 color rgb <1,1,1> shadowless}
background{ White*0.7 } // Black } //
// 0.45
#declare monfinish=finish{ ambient 0.2 diffuse 0.7 reflection 0.1 roughness 0 phong 1. phong_size 4};
//===================================================
#declare tabcol=array[10]{Blue,Red,Cyan,SeaGreen,Magenta,Khaki,Pink,Aquamarine,Copper,Gold};
#declare R= 4.5;
//------------
declare coef=0.5;
//#declare r=0.32 ; #declare a=2*coef; #declare b=1.8*coef; #declare c=5*coef; // carré courbe 2 pavage
#declare r=0.5 ; #declare a=4*coef; #declare b=1.5*coef; #declare c=5*coef; // cercle courbe 2 borromee
//#macro courbe(uu) #end
#macro courbe(uu) #end
//===================================================
#declare borromee=union{
union{ #local n=400; #local pas=2*pi/n ;
#for(i,0,n-1,1) cylinder{courbe(i*pas),courbe((i+1)*pas),r } sphere{courbe(i*pas),r } #end //
pigment{Yellow*0.9} finish{monfinish}
}
torus{ 4,r pigment{ Blue} finish{monfinish} rotate 45*z translate <0,0,5> }
torus{ 4,r pigment{ Red} finish{monfinish} rotate -45*z translate <0,0,-5> }
}
#declare partie=
union{ #local n=200; #local pas=2*pi/n ;
#for(i,0,n-1,1) cylinder{courbe(i*pas),courbe((i+1)*pas),r } sphere{courbe(i*pas),r } #end //
}
#declare d=c*0.8; // courbe 1 // c*0.7; // courbe 2 //
/* // =============== carré de courbes =================
#declare basex=union{ object { partie rotate -45*z rotate 90*y translate d*x pigment{Red} finish{monfinish}} // pigment{Red}
object { partie rotate -45*z rotate 90*y translate -d*x pigment{Yellow*0.9} finish{monfinish}} // pigment{Blue}
};
#declare basey=object{ basex rotate 90*z translate <-2.5*d,-1.7*d,0> }
#declare n=1;
union{
#for(i,0,n,1) object { basex translate 4*i*d*x } object { basex rotate 180*z translate *4*d }
object { basey translate -4*i*d*y } object { basey rotate 180*z translate 4*d* }
#end // translate R*<-1,1,0> Axis_Rotate_Trans(<1,1,0>, ang) }
// sphere{0,0.2 pigment{ Magenta}}
translate 2*(n-1/2)*d*<-1.5,4.1,0> // 2*(n-1/2)*d*<-1.1,2.1,0> //
scale 0.75 //0.55 //
rotate <-5,8,-3>
}
*/
/*
// =============== cercle de courbes =================
#declare R=11;
#declare base1= object { partie rotate 45*z rotate 90*x rotate 5*z translate R*x pigment{Red} finish{monfinish}} // SeaGreen pigment {rgb <.93,.182,.11>}
#declare base2= object{ partie rotate 45*z rotate 90*x rotate 5*z translate R*x pigment{ Yellow*0.9} finish{monfinish}} // Orange pigment{Blue*0.9}
union{
#declare n=20; #declare ang=360/n;
#for(i,0,n,1) object{base1 rotate 2*i*ang*z } object{base2 rotate (2*i+1)*ang*z } #end
// object{base1} object{ axes scale 3}
scale 0.6
rotate <-20,-20,0>
}
*/
text{
ttf "timrom.ttf" "AE" 0.4, 0
scale 0.95
rotate <-10,10,0>
translate <1,-1.3,-4>*5.8
pigment { White*0.4 }
}
object{borromee scale 1. rotate 45*z rotate 90*y rotate -40*x rotate 45*z }