POV-Ray : Newsgroups : povray.binaries.images : Friday Afternoon Doodle : Friday Afternoon Doodle Server Time
28 May 2024 09:43:12 EDT (-0400)
  Friday Afternoon Doodle  
From: Chris R
Date: 4 Mar 2022 16:30:00
Message: <web.622284a270cc26e789a9c4065cc1b6e@news.povray.org>
I tend to use isosurfaces a lot in my scenes, mainly because I like the ability
to perturb them with textures to give more realism than normals in the texture
can provide.

One of the things I've noticed is how fast and clean isosurfaces based on built
in functions, like f_rounded_box are, and how bad any of my attempts at doing
extruded shapes end up being, so I thought about using an isosurface to extrude

So I've been playing around with shapes extruded along one of the axes, by
changing the rounding parameter and the scaling parameters on the other two
axes, as well as translating the center of the rounded box along those two other
axes in various ways, including linear interpolation, spline interpolation, and
various other functions.

This is the one where the scale decreases linearly from bottom to top, the
rounding factor decreases linearly from bottom to top, and the x and z centers
of the box are translated using sin(y*2*pi/height) and cos(y*2*pi/height).

It rendered, very quickly, with no holes or artifacts!

I'm sure others have discovered this long ago, but I will certainly be taking
more advantage of this, rather than painful unions whenever possible.

-- Chris R

Post a reply to this message

Download 'roundbox.png' (802 KB)

Preview of image 'roundbox.png'


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