POV-Ray : Newsgroups : povray.newusers : rendering of a wobbeling plane : Re: rendering of a wobbeling plane Server Time
28 Jul 2024 16:26:54 EDT (-0400)
  Re: rendering of a wobbeling plane  
From: Mike Williams
Date: 19 Apr 2008 01:36:55
Message: <grzj4gACLYCIFwtR@econym.demon.co.uk>
Wasn't it Larry Hudson who wrote:

>Hmmm...  I read atomman's question to mean he wants to use normals to
>the plane to create "wobbles" or undulations and have the objects
>remain in contact with these undulations.  The problem is that normals
>don't create real displacements to the surface, so the plane actually
>remains a totally flat plane, it just has the visual appearance of
>displacements.  So I don't think he can do what he wants by simply
>using normals and this will have to be approached differently --
>isosurfaces perhaps?

With isosurfaces you can do this:


#version 3.6;
global_settings {assumed_gamma 1.0}
camera {location  <4,4,-10> look_at <0,0,0> angle 20}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}


#include "functions.inc"
#declare Scale=0.5;
#declare Height=0.5;

#declare Floor = isosurface {
  function { y - f_waves(x/Scale,y,z/Scale)*Height }
        max_gradient 1.1
        contained_by{sphere{0,5}}
        pigment {rgb <.5,.5,1>}
}

object{Floor}

#declare X=-3;
#while (X<3)
  #declare Z=-3;
  #while (Z<3)
    #declare A=<X,10,Z>;
    #declare N=<0,0,0>;
    #declare P=trace(Floor,A,-y,N);
    cylinder {P, P+N*0.2, 0.02 pigment {rgb <1,1,0>}}
    #declare Z=Z+0.5;
  #end
  #declare X=X+0.5;
#end

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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