|
![](/i/fill.gif) |
William F Pokorny <ano### [at] anonymous org> wrote:
> Cool!
Isn't it?
You can invert anything, even whole patterns, like so:
#declare Inversion = function {Radius*Radius / ( pow (x-CenterX, 2) + pow
(y-CenterY, 2) + pow (z-CenterZ, 2))}
#declare Checker_Inv = function {
Checker (
x*Inversion (x, y, z),
y*Inversion (x, y, z),
z*Inversion (x, y, z)
).red
}
plane {z, 0 pigment {function {Checker_Inv (x, y, z)}}}
I was trying to figure out a way to plug this into a matrix transform, but
POV-Ray doesn't allow that kind of thing.
/*
#declare M_Inversion =
function {
transform {
matrix <
Inversion (x, y, z), 0, 0,
0, Inversion (x, y, z), 0,
0, 0, Inversion (x, y, z),
0, 0, 0
>
}
}
*/
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 5/29/24 06:54, Bald Eagle wrote:
> You can invert anything, even whole patterns, like so:
Thanks for posting more detailed code. I played a little - and it's cool
- though the results kinda twist my head around at times. :-)
Attached is a slice of a sphere to the -z side of the x,y plane where
the radius of a f_sphere() is getting 'inverted / chopped' with your
'Checker_Inv()' (I also clamped the maximum Inversion() value to 15).
The sides sliced at the inversions don't render cleanly with the
isosurface, but we still end up with an interesting looking shape.
A little surprised it worked as well as it did...
Bill P.
FYI. I did get a few divisions by zero from Inversion() until I added
some off grid, anti-directional, numerical fuzz to CenterX, CenterY and
CenterZ. This might be due how my yuqk AA works compared to the
officially released AA.
Post a reply to this message
Attachments:
Download 'tmp2.png' (105 KB)
Preview of image 'tmp2.png'
![tmp2.png](/povray.advanced-users/attachment/%3C665780c7%241%40news.povray.org%3E/tmp2.png?preview=1)
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
So that's very cool, and I wondered what it would look like if rendered as a
whole sphere, maybe with a glass texture and some sort of variation of the color
- perhaps determined by the Manhattan distance from the center.
I just used a quick, textured box, and the larger the inversion circle, the
smaller / more compact the pattern. Patterns jump out at different scales.
Post a reply to this message
Attachments:
Download 'invertedpatternsphere.png' (262 KB)
Preview of image 'invertedpatternsphere.png'
![invertedpatternsphere.png](/povray.advanced-users/attachment/%3Cweb.6657dbbe3bd24dfe1f9dae3025979125%40news.povray.org%3E/invertedpatternsphere.png?preview=1)
|
![](/i/fill.gif) |