POV-Ray : Newsgroups : povray.binaries.scene-files : Artistic half-tone or drawing with pens : Artistic half-tone or drawing with pens Server Time
2 Sep 2024 10:14:56 EDT (-0400)
  Artistic half-tone or drawing with pens  
From: Kari Kivisalo
Date: 6 Feb 2002 03:51:34
Message: <3C60EED6.D18A8544@engineer.com>
pic.jpg is gray scale image and hf.jpg is the same but blurred.

#version 3.5;

camera {
  orthographic
  location <0,0,-1>   
  look_at  <0,0,0>
  right 1*x 
  up 1*y
}

background{rgb 1}

#declare Mark=
  cylinder{-0.5*x,0.5*x,0.5 pigment{rgb<0,0,0>}
  finish{ambient 0 diffuse 0}}

#declare V=
  function{
    pigment{
      image_map{jpeg "pic.jpg" interpolate 2}
      translate -0.5
    }
  }

#declare HF=
height_field{jpeg "hf.jpg" translate<-0.5,-1,-0.5> rotate -90*x
  pigment{gradient -z} finish{diffuse 0 ambient 1}
  }


#declare Normal=<0,0,0>;
#declare Div=0.01;
#declare S=seed(4);

#declare X=-0.5;#while(X<0.5)
  #declare Y=-0.5;#while(Y<0.5)
    #declare tmp=trace(HF, <X,Y,-2>, z, Normal);
    #declare n1=vnormalize(Normal);
    #declare Normal=n1;
    #declare I=max((1-(V(X,Y,0).red*0.6)),0)^5;
    #if(sqrt((Normal.x)^2+(Normal.y)^2)>0.0001)
      object{
         Mark scale<Div*4*(1-I/2),Div*I,Div*I>+Div/100
         rotate z*(degrees(atan2(Normal.y,Normal.x))+90+10-rand(S)*20)
         translate<X+Div/2-rand(S)*Div,Y+Div/2-rand(S)*Div,X+Y+1>
      }
    #else
       object{
         Mark scale<Div*4*(1-I/2),Div*I,Div*I>+Div/100
         rotate z*360*rand(S)
         translate<X+Div/2-rand(S)*Div,Y+Div/2-rand(S)*Div,X+Y+1>}
    #end
  #declare Y=Y+Div;#end
#declare X=X+Div;#end


_____________
Kari Kivisalo


Post a reply to this message

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