POV-Ray : Newsgroups : povray.general : Post something : Re: Post something Server Time
16 Apr 2026 07:46:01 EDT (-0400)
  Re: Post something  
From: kurtz le pirate
Date: 13 Apr 2026 06:20:09
Message: <69dcc359@news.povray.org>
My Chladni patterns inspired from Ingo

--- sdl ----------------------------------------------------------------
camera {
  orthographic
  location <0,0,-1>
  look_at 0
  right x*image_width/image_height
  }

light_source {
  <0,0,-100>
  color rgb 1
  }

#declare fnChladni = function(x,y,z,_n,_m,_l) {
  cos(_n*pi*x/_l)*cos(_m*pi*y/_l) - cos(_m*pi*x/_l)*cos(_n*pi*y/_l)
  }

#declare n = 7; // number of curves
#declare d = 1/(n+1); // gap
#declare ep = 0.008; // line thickness

#declare Col0 = rgb 0; // first color
#declare Col1 = rgb 1; // second color

#declare CMap = color_map {
  [0 Col0 ]
  #declare i = 1;
  #while ( i < n+1 )
   #declare x0 = i*d-ep;
   #declare x1 = i*d+ep;
   [ x0 Col0 ]
   [ x0 Col1 ]
   [ x1 Col1 ]
   [ x1 Col0 ]
   #declare i = i + 1;
  #end
  [ 1 Col0 ]
  }

// Chladni params
#declare m = 5;
#declare n = 13;
#declare l = 0.6;

plane {
  z, 0
  texture {
   pigment {
    function { fnChladni(x,y,z,n,m,l) }
    color_map { CMap }
    }
   }
  }

--- sdl ----------------------------------------------------------------


-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message


Attachments:
Download 'chladni_4.jpeg.jpg' (973 KB)

Preview of image 'chladni_4.jpeg.jpg'
chladni_4.jpeg.jpg


 

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