Custom shader

I would like to try out a shading method but i dont know c++ or Cg language.

How easy or hard would it be to write a shader that does something like that?:

#a single vert
vert.pos=(x,y,z)
vert.norm=(x,y,z)
vert.uv=(x,y)
vert.col=(r,g,b,a)

#a triangle
tri.verts=[vert,vert,vert]
tri.norm=(x,y,z) #this is the face normal
#if tris have no normals, then
tri.norm=calcnorm(vert1,vert2,vert3)
tri.col=(r,g,b,a)

#a model
model.vert=[]
model.tris=[]

#a directional light
light.col=(r,g,b,a)
light.norm=(x,y,z)

def shade():
    for i in model.tris:
        angleDif=(light.norm,i.norm)
        
        if angleDif<30:
            tri.col=(1,1,1,1)
        elif angleDif>150:
            tri.col=(0,0,0,1)
        else:
            tri.col=(0.5,0.5,0.5,1)

sounds a bit like cartoon-inking. have you looked at the soon-shading sample? should be rather close to what you’r looking for.
if you dont know Cg you should have a look at the Cg language first or you’ll most likely have difficulties to write shaders. it’s not that hard.
i think somehwere on the forum there was a thread with links to tutorials on how to get strated with Cg

Thanks for the tips, i found the tutorials on the forum, yet it still seems i wont learn and make that shader in 1h not even in 1 day.

So my question is how long would it take a person, who knows Cg, to write a shader like that?

Just want to get an overview wether my learnig time+my writing time<finding someone who would be willing to write a shader like that.

propably a few minutes