Monday, November 2, 2009

Knowledge Pattern Tweek

So it was a simple test tonight, maybe just to try it and see if it worked.  I am already plotting the next tutorial that will involve some form of 'intelligence' for the insertion of UDFs.  The simple test tonight was to color the UDF based on the even or odd values of i and j.  Since there is no even or odd, I had to use MOD.  In this case there are if/else statements to change the color.

Future tutorial will create a script that decides which UDF to insert given a certain condition.  At least this is where I am heading.  It will probably just be a simple condition, but way in the future this might be based on curvature or planarity.




Using the previous tutorial you can insert the following text in place of the p1.color line:

if mod(j,2)<1 and mod(i,2)<1
            p1.Color =   "143,188,143"
else if mod(j,2)>0 and mod(i,2)>0
            p1.Color =   "193,205,193"
else
            p1.Color =   "131,139,131"


No comments: