POV-Ray : Newsgroups : povray.binaries.images : Fun with aoi and slope Patterns... : Re: Fun with aoi and slope Patterns... Server Time
30 Jul 2024 10:23:56 EDT (-0400)
  Re: Fun with aoi and slope Patterns...  
From: waggy
Date: 22 Dec 2011 15:35:00
Message: <web.4ef39391834013999726a3c10@news.povray.org>
clipka:  Actually, a true curvature pattern is what I really want (despite
boring CSG seams) and you're correct that it would be better to calculate it
precisely for each of the two-dozen or so primitives, basically following the
same idea as how the surface normal is calculated at a ray-object intersection
point.  As with the slope pattern, I was thinking in terms of a directional
derivative, so the slopes at two nearby points on a surface are sufficient to
calculate the curvature in that direction.  (That's pretty much the definition
of curvature in the limit as the distance between the points approaches zero.)
I'll admit that, for many reasons, my idea of doing this by finite differencing
is generally not a good one, (except for isosurface and parametric objects).  In
any case, it would be a boatload of work to integrate it into the POV-Ray
source, and if few others are likely to use it, probably not worthwhile.

Although I could use it for cartoon-style images (the pumpkins, for examples,
are blobs and should be C2-continuous), my main intention is to use a curvature
pattern to bring out more detail in 3D fractals.  Since I have these formulas,
this is something I can probably do in SDL, at worst on a per-function basis.

Mr. de Groot:  Besides edge rendering, I was also looking for a way to shade
objects by hatching, as illustrated by the image of a simple sphere attached.
Note that the hatching is done by surface normal perturbation, and can give the
impression of an object's surface normal by variations in line thickness.
(Although this works, I do not yet have an image I'm happy with to illustrate
it.)  I like very much that this capability is part of POV-Ray.

Good times.


Post a reply to this message


Attachments:
Download 'hatch_sphere_2011-12-22.png' (38 KB)

Preview of image 'hatch_sphere_2011-12-22.png'
hatch_sphere_2011-12-22.png


 

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