Monday 17 March 2014

St coloration pattern


 This is a method of using the ST coordinate to create a pattern. Basically we try and color the coordinates that has been pre-specify within the RSL code. Here are some primitives.



if (t > .5) surface_color = color (0,1,.5); Example of a Line.



if ((t <= 0.7 && t >= 0.3) || (s <= 0.7 && s >= 0.3)) surface_color = color (2,1,0);  A Cross



   
if (t<=.75 && t>=.25 && s>=.25 && s<=.75) surface_color = color (2,1,0);  A Square




if (t>=1-s) surface_color = color (2,1,0); Diagonal




if (s*s + t*t < 1) surface_color = color (2,1,0); A Curve




if ((s-.5)*(s-.5) + (t-.5)*(t-.5) <= .1) surface_color = color (2,1,0); A Circle

 




if (((s-.5)*(s-.5)+(t-.5)*(t-.5)<=.2) && ((s-.57)*(s-.57)+(t-.57)*(t-.57)>=.13)) surface_color= color (2,1,0); Crescent Moon.







No comments:

Post a Comment