// File: canvas.pov // Author: François Labrèque // Date: 3 dec 2011 // // Notes: // simple canvas texture created to prove a point. #version 3.6; #declare Thread_N = normal{ //This is the normal perturbation of the thread itself //against a flat surface gradient y slope_map{ [ 0 <0, 0>] [ 0.1 <0, 0>] [ 0.1 <0, 10>] [ 0.5 <0.2, 0>] [ 0.9 <0, -10>] [ 0.9 <0, 0>] [ 1 <0, 0>] } }//Thread_N #declare ThreadOver_N = normal{ //This is the normal perturbation of a thread going over //another one gradient x slope_map{ [ 0 <0, 10>] [0.5 <0.3 0>] [ 1 <0, -10>] } }//ThreadOver_N #declare ThreadAbove_N = normal{ //This creates a thread going in the X direction //passing over another one average normal_map{ [1 Thread_N] [1 ThreadOver_N] } }//ThreadAbove_N #declare ThreadBelow_N = normal{ // this creates a thread goint in the X direction // passing under another one average normal_map{ [1 Thread_N] [1 ThreadOver_N rotate 180*x ] } }//ThreadBelow_N #declare ThreadOverAndUnder_N = normal{ // this is the combination of both threads to create // one canvas square gradient y normal_map{ [ 0 ThreadBelow_N rotate 90*z ] [ 0.1 ThreadBelow_N rotate 90*z ] [ 0.1 ThreadAbove_N ] [ 0.9 ThreadAbove_N ] [ 0.9 ThreadBelow_N rotate 90*z ] [ 1 ThreadBelow_N rotate 90*z ] } }//ThreadOverAndUnder_N #declare Canvas_N = normal{ //this is the real deal checker normal{ ThreadOverAndUnder_N}, normal{ ThreadOverAndUnder_N rotate 90*z } }//Canvas_N #declare Canvas_T = texture { pigment{ color rgb 1 } finish{ ambient 0.1 diffuse 0.6 brilliance 1.0 } normal{ Canvas_N } }//Canvas_T //Lights!!! light_source { <-20, 40, -20> color rgb <1,1,1> } //Camera!!! camera { location <0.0, 1.5, -2> look_at <0.0, 0.0, 0.0> } //Action!!! plane { y, 0 texture{ pigment{ color rgb <1,1,1>} } } box{ <-1,0,-1> <1, 0.05, 1> texture{ Canvas_T rotate 90*x scale 0.1} }