#version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 6 } background { color rgb <1.0, 0.97, 0.95> } camera { location <0, 3.2, -9.5> look_at <0, 1.7, 0> angle 35 } light_source { <6, 9, -8> color rgb <1.00, 0.78, 0.60> * 1.15 area_light <2.2, 0, 0>, <0, 0, 2.2>, 5, 5 adaptive 1 jitter } light_source { <-7, 7.5, -6> color rgb <1.00, 0.82, 0.68> * 0.75 area_light <1.8, 0, 0>, <0, 0, 1.8>, 4, 4 adaptive 1 jitter } plane { y, 0 pigment { color rgb <0.98, 0.94, 0.92> } finish { diffuse 0.85 specular 0.08 roughness 0.08 } } #declare Card_W = 5.0; #declare Card_H = 3.6; #declare Card_T = 0.10; #declare Card_Round = 0.22; #declare CardPig = pigment { color rgb <1.0, 0.97, 0.98> }; #declare CardFin = finish { diffuse 0.9 specular 0.10 roughness 0.06 }; #declare HeartPig = pigment { color rgb <0.88, 0.10, 0.22> }; #declare HeartFin = finish { diffuse 0.85 specular 0.18 roughness 0.05 }; #declare CardFront = union { // Main rounded rectangle using box + cylinders (precise fit) box { <-Card_W/2 + Card_Round, Card_Round, 0>, < Card_W/2 - Card_Round, Card_H - Card_Round, Card_T> pigment { CardPig } finish { CardFin } } box { <-Card_W/2, Card_Round, 0>, < Card_W/2, Card_H - Card_Round, Card_T> pigment { CardPig } finish { CardFin } clipped_by { box { <-Card_W/2, Card_Round, -1>, } } } // Four corner cylinders (quarter-round corners) cylinder { <-Card_W/2 + Card_Round, Card_Round, 0>, <-Card_W/2 + Card_Round, Card_Round, Card_T>, Card_Round pigment { CardPig } finish { CardFin } } cylinder { < Card_W/2 - Card_Round, Card_Round, 0>, < Card_W/2 - Card_Round, Card_Round, Card_T>, Card_Round pigment { CardPig } finish { CardFin } } cylinder { <-Card_W/2 + Card_Round, Card_H-Card_Round, 0>, <-Card_W/2 + Card_Round, Card_H-Card_Round, Card_T>, Card_Round pigment { CardPig } finish { CardFin } } cylinder { < Card_W/2 - Card_Round, Card_H-Card_Round, 0>, < Card_W/2 - Card_Round, Card_H-Card_Round, Card_T>, Card_Round pigment { CardPig } finish { CardFin } } // Clip to rectangular bounds to keep corners quarter-rounded precisely clipped_by { box { <-Card_W/2, 0, -0.5>, } } } #declare InnerPanel = box { <-Card_W/2 + 0.18, 0.18, 0>, < Card_W/2 - 0.18, Card_H - 0.18, 0.03> pigment { color rgb <1.0, 0.995, 0.995> } finish { diffuse 0.92 specular 0.06 roughness 0.08 } translate <0, 0, -0.02> } #declare HeartShape = union { // Two lobes sphere { <-0.55, 0.55, 0>, 0.72 pigment { HeartPig } finish { HeartFin } } sphere { < 0.55, 0.55, 0>, 0.72 pigment { HeartPig } finish { HeartFin } } // Point (diamond-ish) via scaled sphere clipped intersection { sphere { <0, -0.15, 0>, 1 pigment { HeartPig } finish { HeartFin } } plane { y, 0.05 inverse } scale <1.05, 1.35, 0.35> translate <0, -0.15, 0> } // Flatten to a badge scale <1.15, 1.15, 0.22> } union { // Card standing on ground, slightly tilted back union { object { CardFront } object { InnerPanel } translate <0, 0.35, 0> rotate < -12, 0, 0> translate <0, 0.0, 0.6> } // Heart on the front face (slightly lifted to avoid z-fighting) object { HeartShape scale 1.05 translate <0, 2.05, 0.6 + Card_T + 0.02> rotate < -12, 0, 0> translate <0, 0.35, 0> } // Simple base support (hidden behind card) for stability box { <-1.2, 0.0, 0.25>, <1.2, 0.25, 1.35> pigment { color rgb <0.96, 0.88, 0.86> } finish { diffuse 0.85 specular 0.06 roughness 0.10 } translate <0, 0, 0> } }