POV-Ray : Newsgroups : povray.general : Can I get the coordinate? : Can I get the coordinate? Server Time
29 Jul 2024 22:26:36 EDT (-0400)
  Can I get the coordinate?  
From: And
Date: 10 Jul 2010 00:30:01
Message: <web.4c37f6d89e64bfadcf51b3890@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.