/* * LUMIERES * premier jet le 4 avril 2022, rue Ernest Renan * */ /* ====================================================== */ /* ====================================================== */ /* * nouveau 27 avril 2022 - enfin un spot configurable */ #local Lts2 = 0.15; #local Rts2 = 0.10; #declare Tube_Spot_2 = object { difference { cylinder { <0, 0, -Lts2>, <0, 0, Lts2>, Rts2 } cylinder { <0, 0, -5>, <0, 0, Lts2-0.01>, Rts2-0.01 } } texture { GRIS_BROTCH } } // --------- #macro Lumiere_Spot_2(Teinte) /* XXX */ light_source { <0, 0, 0.06> , color rgb Teinte*0.72 fade_distance (FADE_D * 0.55) fade_power (FADE_P * 1.90) } #end // --------- #declare Lampe_Spot_2 = object { /* * mmmm, et si on fait une macro, on doit * pouvoir passer un Phi pour avoir des lampes * de differentes couleurs */ #local VR = Cos_010(NormClock); #local VG = NormClock; #local VB = 1.0 - NormClock; union { object { Tube_Spot_2 } object { Lumiere_Spot_2() } } } /* ====================================================== */ /* nouveau 24 avril 2022 */ #declare QLsz = 0.42; #declare QLh = 0.17; #declare QLe = 3.70; // ecartement des 4 lampes #declare QuadriLampe_a = object { #local Exz = QLsz - 0.004; #local Ey = QLh - 0.004; difference { box { <-QLsz, -QLh, -QLsz>, } box { <-Exz, -1, -Exz>, } } texture { MON_VERT_INDUS } } #declare QuadriLampe_b = object { union { object { QuadriLampe_a } light_source { < 0, 0, 0> , #if (clock < 190) color rgb <0.08, 0.11, 0.04> #else color rgb <0.48, 0.44, 0.44> #end fade_distance (FADE_D * 0.50) fade_power (FADE_P * 1.85) } } rotate y*45 /* XXX */ } #declare QuadriLampe_support = object { #local Hs = 0.33; union { #local E = QLe + 0.11; cylinder { <-E , Hs, 0>, < E , Hs, 0>, 0.058 } cylinder { < 0, Hs, -E>, < 0, Hs, E>, 0.058 } cylinder { <-QLe, 0, 0>, <-QLe, Hs, 0>, 0.049 } cylinder { < QLe, 0, 0>, < QLe, Hs, 0>, 0.049 } cylinder { < 0, 0, -QLe>, < 0, Hs, -QLe>, 0.049 } cylinder { < 0, 0, QLe>, < 0, Hs, QLe>, 0.049 } } texture { pigment { color rgb <0.53, 0.40, 0.73> } finish { phong PHONG specular SPECULAR } } #undef Hs } #declare QuadriLampe_a4 = object { union { object { QuadriLampe_support translate y*0.10 } object { QuadriLampe_b translate <-QLe, 0, 0> } object { QuadriLampe_b translate < QLe, 0, 0> } object { QuadriLampe_b translate < 0, 0, -QLe> } object { QuadriLampe_b translate < 0, 0, QLe> } } } #declare QuadriLampe = object { object { QuadriLampe_a4 } } /* ====================================================== */ #declare LCDim = 0.145; #declare Lampe_Cube_boite = object { #local LCDb = LCDim - 0.015; // interieur boite #local LCDo = LCDim - 0.050; // ouverture boite difference { box { <-LCDim, -LCDim, -LCDim>, } box { <-LCDb , -LCDb , -LCDb >, } box { <-LCDo , -0.666, -LCDo >, } } texture { pigment { color rgb <0.59, 0.53, 0.63> } finish { phong PHONG specular SPECULAR } } } #declare Lampe_Cube = object { #local LCDe = LCDim * 0.05; union { object { Lampe_Cube_boite } light_source { < LCDe, 0, LCDe> , color rgb <0.38, 0.45, 0.38> fade_distance (FADE_D * 0.50) fade_power (FADE_P * 1.80) } light_source { <-LCDe, 0, -LCDe> , color rgb <0.40, 0.32, 0.32> fade_distance (FADE_D * 0.60) fade_power (FADE_P * 1.90) } } } /* ---- improvisé à la rache ---- 5 mai 2022 */ #macro Lampe_Cube_2(Teinte) object { union { object { Lampe_Cube_boite } light_source { < 0, 0, 0> , color Teinte // XXX ? line 138: Parse Warning: Suspicious expression after rgb. fade_distance (FADE_D * 0.80) fade_power (FADE_P * 1.90) } } } #end /* =============================================================== */ /* * */ #declare Lampe_V0_tube = object { #declare H_tube = 1.05; #declare R_tube = 0.12; #declare E_tube = 0.012; // epaisseur de la tole #declare H2b = -H_tube + E_tube; #declare H2h = H_tube - E_tube; #declare R2 = R_tube - E_tube; intersection { box { <-1, -5, R_tube * 0.54>, < 1, 5, -1> } difference { cylinder { <0, -H_tube, 0>, <0, H_tube, 0>, 0.20 } cylinder { <0, H2b, 0>, <0, H2h, 0>, R2 } } } texture { pigment { color rgb <0.53, 0.39, 0.53> } finish { phong PHONG specular SPECULAR } } } /* --------------------------------------------------------------- */ #declare Lampe_V0_les_ampoules = object { union { light_source { < 0, -H_tube/2, 0>, color Cyan*0.45 fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.90) } light_source { < 0, H_tube/2, 0>, color Magenta*0.45 fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.90) } } translate (R_tube*0.15) * z } /* --------------------------------------------------------------- */ #declare Lampe_V0_pied = object { merge { cylinder { <0, 0, 0>, <0, 2.10, 0>, 0.04 } cylinder { <0, 0.10, 0>, <0, 0.30, 0>, 0.08 } sphere { 0, 0.08 scale <1, 0.25, 1> translate y*0.30 } cylinder { <0, 0.20, 0>, <-0.50, 0.01, 0.49>, 0.035 } cylinder { <0, 0.20, 0>, < 0.50, 0.01, 0.49>, 0.035 } cylinder { <0, 0.20, 0>, < 0.00, 0.01, -0.42>, 0.035 } } texture { pigment { color Gray70 } finish { phong PHONG specular SPECULAR } } } /* --------------------------------------------------------------- */ #declare Lampe_V0 = object { union { #local HH = 1.90; object { Lampe_V0_tube translate y*HH } object { Lampe_V0_les_ampoules translate y*HH } object { Lampe_V0_pied translate <0, 0, -0.28> } } } /* =============================================================== */ // https://wiki.povray.org/content/Reference:Light_Source#Spotlights /* Default values: radius: 30 degrees falloff: 45 degrees tightness: 0 */ #declare Spot = object { light_source { <0, Sz_Y - 2, 0> color rgb <0.61, 0.55, 0.59> spotlight radius 20 // default 30 falloff 36 // default 45 tightness 10 // point_at <0.35, 0, 7.77> point_at <0.22, 0, 3.80> } } /* =============================================================== */ #declare R_LB = 0.36; #declare Lampe_Boule_A = object { intersection { difference { sphere { 0, R_LB } sphere { 0, R_LB-0.02 } } #local E = R_LB + 0.5; box { <-E, -0.172, -E>, } } texture { pigment { color Gray80 } finish { phong PHONG specular SPECULAR } } } #declare Lampe_Boule_Rouge = object { union { object { Lampe_Boule_A } #local HL = R_LB*0.71; light_source { < 0, HL, 0>, color rgb <0.70, 0.20, 0.20> fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.70) } } } #declare Lampe_Boule_Verte = object { union { object { Lampe_Boule_A } #local HL = R_LB*0.71; light_source { < 0, HL, 0>, color rgb <0.20, 0.70, 0.20> fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.70) } } } #declare Lampe_Boule_Bleu = object { union { object { Lampe_Boule_A } #local HL = R_LB*0.71; light_source { < 0, HL, 0>, color rgb <0.15, 0.15, 0.70> fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.90) } } #declare Lampe_Boule_Blanche = object { union { object { Lampe_Boule_A } #local HL = R_LB*0.71; light_source { < 0, HL, 0>, rgb <0.90, 0.90, 0.90> fade_distance (FADE_D * 0.70) fade_power (FADE_P * 1.90) } } } }/* =============================================================== */ #declare Flashy_One = object { #local B = 0.15 + (0.27 * abs(sin(radians(clock*3.96)))); light_source { <0, 0, 0> color <0.35, B, 0.35> fade_distance (FADE_D * 0.80) fade_power (FADE_P * 1.70) } } #declare Flashy_Two = object { #local R = 0.33 + (0.27 * sin(radians(clock*3.59))); light_source { <0, 0, 0> color fade_distance (FADE_D * 0.80) fade_power (FADE_P * 1.70) } } /* =============================================================== */ /* * nouveau 30 septembre 2022 */ #declare Lampe_Rotonde = object { #local DLR = 0.42; union { box { <-DLR, 0.25, -DLR> pigment { color Gray70 } } box { <-DLR, 0.00, -DLR> pigment { color Gray70 } } light_source { <0, 0.12, 0> color <0.37, 0.27, 0.37> fade_distance (FADE_D * 0.80) fade_power (FADE_P * 1.80) } } } /* =============================================================== */