chayanvinayak

05-09-2007, 01:15 PM

i am making a eye shader in renderman for first i am creating a shader to show capillary network of eye.

till now i have created straight lines ,but i could not achieve network/ reticulate structure of capillaries.I have used following code for that.

Kindly suggest the way to achieve the reticulate structures of lines :

Thanks

----------------------------------------------------------------

color capillaries(float l1,r1,margin,no_of_lines,radius,loc_x,loc_y;color c1)

{

color result = 1;

float i=1;

//if(radius > sqrt((s-loc_x)*(s-loc_x) + (t-loc_y)*(t-loc_y))){

while(i<=no_of_lines){

//if(s>(l1+margin*i) && s<(r1+margin*i))

if(s>tan(t))

result = c1;

i+=1;

}

//}

return result;

}

till now i have created straight lines ,but i could not achieve network/ reticulate structure of capillaries.I have used following code for that.

Kindly suggest the way to achieve the reticulate structures of lines :

Thanks

----------------------------------------------------------------

color capillaries(float l1,r1,margin,no_of_lines,radius,loc_x,loc_y;color c1)

{

color result = 1;

float i=1;

//if(radius > sqrt((s-loc_x)*(s-loc_x) + (t-loc_y)*(t-loc_y))){

while(i<=no_of_lines){

//if(s>(l1+margin*i) && s<(r1+margin*i))

if(s>tan(t))

result = c1;

i+=1;

}

//}

return result;

}