//------------------------------------------------------------------------------------ #include "analytical_g.inc" //------------------------------------------------------------------------------------ #declare A = <-0.70, 0.30,-0.50>; // change point sequence of triangle ABC->ACB if it does not work #declare B = < 1.00, 0.70, 0.50>; #declare C = < 0.70, 0.20,-0.50>; //------------------------------------------------------------------------------------ sphere{ A, 0.035 pigment{ color rgb<1,0.2,0> } no_shadow } object{ Show_Yxz( A, 0.02) pigment{ color rgb<1,1,1>*0.7} no_shadow } sphere{ B, 0.035 pigment{ color rgb<1,0.2,0> } no_shadow } object{ Show_Yxz( B, 0.02) pigment{ color rgb<1,1,1>*0.7} no_shadow } sphere{ C, 0.035 pigment{ color rgb<1,0.2,0> } no_shadow } object{ Show_Yxz( C, 0.02) pigment{ color rgb<1,1,1>*0.7} no_shadow } text { ttf "arial.ttf", "A",0.1,0 scale 0.25 rotate<20,-45,0> translate A+<-0.2,-0.1,-0.1> pigment{ color Red*0.7 } no_shadow} text { ttf "arial.ttf", "B",0.1,0 scale 0.25 rotate<20,-45,0> translate B+< 0.2,0.0,-0.0> pigment{ color Red*0.7 } no_shadow } text { ttf "arial.ttf", "C",0.1,0 scale 0.25 rotate<20,-45,0> translate C+<-0.0,0.2,-0.1> pigment{ color Red*0.7 } no_shadow } //------------------------------------------------------------------------------------ // triangle ABC // triangle { A, B, C pigment{ color Yellow transmit 0.5 }} cylinder{ A, B, 0.02 pigment{ color rgb<0.7,0.0,0> } no_shadow } cylinder{ B, C, 0.02 pigment{ color rgb<0.7,0.0,0> } no_shadow } cylinder{ A, C, 0.02 pigment{ color rgb<0.7,0.0,0> } no_shadow } //------------------------------------------------------------------------------------ // Circum circle of triangle ABC // circum circle center. sphere{ Triangle_M_out( A, B, C ), 0.05 pigment{ color rgb<0.75,1,0> }} // circum circle line: ............... object{ Circle_Line_out( A, B, C, 0.025) pigment{ color rgb<1,0.65,0> }} // circum circle area ............. object{ Circle_Disc_out( A, B, C ) pigment{ color rgb<1,0.65,0> transmit 0.5 }} // circum circle radius // = Triangle_R_out( A, B, C ) text{ ttf "ARIAL.TTF" concat( "Triangle_R_out= ",str( Triangle_R_out( A, B, C ), 6, 3 )," ") , 0.1, 0 scale 0.2 rotate<20,-44,0> translate <0.35,0.1,-1.60> pigment{ color rgb<0.5,1,0>*0.50} no_shadow } //------------------------------------------------------------------------------------