POV-Ray : Newsgroups : povray.binaries.images : Smooth crackle Server Time
30 Jul 2024 10:15:27 EDT (-0400)
  Smooth crackle (Message 1 to 2 of 2)  
From: Tek
Subject: Smooth crackle
Date: 8 Mar 2012 19:25:01
Message: <web.4f594cec7aecb1318ad7eaa80@news.povray.org>
I decided to try applying my smooth CSG maths to the crackle pattern. It's not
perfect (since I can only include influences from the closest 3 points) but it's
pretty good for small amounts of smoothing.

The source (you'll need smooth_csg.inc from p.b.s-f):


#include "smooth_csg.inc"

#local f_crackle0 = function { pattern { crackle form <1/4,0,0> } }
#local f_crackle1 = function { pattern { crackle form <0,1/4,0> } }
#local f_crackle2 = function { pattern { crackle form <0,0,1/4> } }

#local Smoothing = .005;

#local f_max10 = mf_Intersection2( f_crackle1, f_crackle0, Smoothing )
#local f_min10 = mf_Merge2( f_crackle1, f_crackle0, Smoothing )
#local f_crackle10 = function { f_max10(x,y,z) - f_min10(x,y,z) }

#local f_max20 = mf_Intersection2( f_crackle2, f_crackle0, Smoothing )
#local f_min20 = mf_Merge2( f_crackle2, f_crackle0, Smoothing )
#local f_crackle20 = function { f_max20(x,y,z) - f_min20(x,y,z) }

#local f_smoothCrackle = mf_Merge2( f_crackle10, f_crackle20, Smoothing )

#declare smoothCrackle =
 pigment {
  function {
   min(1,max(0,4*f_smoothCrackle(x,y,z)))
  }
 }


--
Tek
http://evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'smooth_crackle.jpg' (170 KB)

Preview of image 'smooth_crackle.jpg'
smooth_crackle.jpg


 

From: Darren New
Subject: Re: Smooth crackle
Date: 11 Mar 2012 14:04:49
Message: <4f5ce941$1@news.povray.org>
On 3/8/2012 16:22, Tek wrote:
> I decided to try applying my smooth CSG maths to the crackle pattern.

That yields an interesting effect.

-- 
Darren New, San Diego CA, USA (PST)
   People tell me I am the counter-example.


Post a reply to this message

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