|
|
I want to make a plane, and I want to pave tile on the plane. If can I get the
coordinate on the plane?
I write like this:
#declare Camera_Location = <6,2,5>;
#declare Plane_Color = <1,1,1>;
#declare Plane =
plane{
<0,1,0>, 0
pigment{rgb Plane_Color}
}
#declare Dist= vlength(trace(Plane, Camera_Location, <0,-1,0>)-Camera_Location);
#declare Tan = (X - Camera_Location.x)/Dist;
#if (Tan > 0)
#local k = 0;
#while (k < 10)
#if (k<PX & X<(k+0.02-0.005*Tan))
#declare Plane_Color = <0,0,0>;
#end
#local k = k + 1;
#end
#else
#local k = 0;
#while (k < 10)
#if (k<(X+0.005*Tan) & X<(k+0.02))
#local Plane_Color = <0,0,0>;
#end
#local k = k + 1;
#end
#end
camera{
location Camera_Location
look_at <0,0,2>
}
Plane
Because the gaps between the tile look smaller while it is far from the camera.
But I don't know the actual X while it render the image.
Thanks.
Post a reply to this message
|
|