surface orange_girl2(float    Kd = 1,
                            position = 0.3,
                            amp = 0.07,
                            freq = 20,
                            radiuhair_s = 0.47,
                            hair_s = 0.5,
                            hair_t = 0.5,
                            radiumouth_s = 0.15,
                            radiumouth_s2 = 0.17,
                            mouth_s = 0.5,
                            mouth_s2 = 0.5,
                            mouth_t = 0.7,
                            mouth_t2 = 0.63,
                            ribbon = 0.2,
                            ribbon_s = 0.25,
                            ribbon_t = 0.2,
                            eyewidth = 0.25,
                            eyeheight = 0.55,
                            eyeradius = 0.07,
                            thickness = 0.03,
                            prop_width = 1.2,
                            prop_height = 1;
                    color    facecolor1 = color(1, 0.98, 0.96),
                            facecolor2 = color(1, 0.9, 0.8),
                            ribboncolor = color(1, 0, 0),
                            haircolor = color(0.3, 0.2, 0),
                            bangcolor = color(0.3, 0.2, 0))
{
normal n = normalize(N);
normal nf = faceforward(n, I);
  
float mask = sqrt((s-0.5)*(s-0.5) + (t-0.5)*(t-0.5)) * 2;
color    surfcolor = mix(facecolor1, facecolor2, mask*mask);
  
//mouth    
if (((s-mouth_s)*(s-mouth_s) + (t-mouth_t)*(t-mouth_t) <= radiumouth_s*radiumouth_s) && ((s-mouth_s2)*(s-mouth_s2) + (t-mouth_t2)*(t-mouth_t2) >= radiumouth_s2*radiumouth_s2))
    surfcolor = color(1, 0.28, 0.57);
  
//hair
if ((s-hair_s)*(s-hair_s)*0.7 + (t-hair_t)*(t-hair_t) >= radiuhair_s*radiuhair_s)
    surfcolor = haircolor;
    
//bang
if (t - position <= amp*cos(s*freq))
    surfcolor = bangcolor;
  
//ribbon
float ss = s - ribbon_s;
float tt = t - ribbon_t;
//tan 
    
if  (pow((ss),4) <= ribbon*ribbon*(ss*ss - tt*tt))
    surfcolor = ribboncolor;
    
  
//right eye
if  (pow(s-eyewidth,2)/pow(prop_width,2) + pow(t-eyeheight,2)/pow(prop_height,2) <= pow(eyeradius,2))
    surfcolor = color(0,0,0);
    
if  (pow(s-eyewidth,2)/pow(prop_width,2) + pow(t-eyeheight,2)/pow(prop_height,2) <= pow(eyeradius-thickness,2))    
    surfcolor = color(1,1,1);
    
  
//left eye
if  (pow(s-(1-eyewidth),2)/pow(prop_width,2) + pow(t-eyeheight,2)/pow(prop_height,2) <= pow(eyeradius,2))
    surfcolor = color(0,0,0);
    
if  (pow(s-(1-eyewidth),2)/pow(prop_width,2) + pow(t-eyeheight,2)/pow(prop_height,2) <= pow(eyeradius-thickness,2))    
    surfcolor = color(1,1,1);
  
  
color diffusecolor = diffuse(nf) * Kd;
  
Oi = Os;
  
Ci = Oi * Cs * surfcolor * diffusecolor * Kd;
}